Filtering-based image coding device and method

ABSTRACT

A picture may be divided into sub-pictures/slices/tiles. For example, the picture may be divided into sub-picture(s), and subpicture-related information may be used for coding. The sub-picture-related information may be generated by an encoding device and transmitted to a decoding device. According to embodiments of the present document, sub-picture-related information can be efficiently signaled.

BACKGROUND OF THE DISCLOSURE Field of the Document

The present document relates to an in-loop filtering-based image codingdevice and method.

RELATED ART

Recently, demand for high-resolution, high-quality image/video such as4K or 8K or higher ultra high definition (UHD) image/video has increasedin various fields. As image/video data has high resolution and highquality, the amount of information or bits to be transmitted increasesrelative to the existing image/video data, and thus, transmitting imagedata using a medium such as an existing wired/wireless broadband line oran existing storage medium or storing image/video data using existingstorage medium increase transmission cost and storage cost.

In addition, interest and demand for immersive media such as virtualreality (VR) and artificial reality (AR) content or holograms hasrecently increased and broadcasting for image/video is havingcharacteristics different from reality images such as game images hasincreased.

Accordingly, a highly efficient image/video compression technology isrequired to effectively compress, transmit, store, and reproduceinformation of a high-resolution, high-quality image/video havingvarious characteristics as described above.

Specifically, for image quality improvement, an in-loop filteringprocess may be performed with respect to reconstructed picture(samples). A decoding apparatus performs signaling of information forthe in-loop filtering process. There is a discussion about a scheme forefficient signaling of in-loop filtering related information.

SUMMARY

According to an embodiment of the present document, a method and anapparatus for enhancing image/video coding efficiency are provided.

According to an embodiment of the present document, a method and anapparatus for efficient filtering application are provided.

According to an embodiment of the present document, a method and anapparatus for efficiently applying deblocking, sample adaptive loop(SAO), and adaptive loop filtering (ALF) are provided.

According to an embodiment of the present document, in-loop filteringmay be performed based on virtual boundaries.

According to an embodiment of the present document, a decoded picturemay be composed of subpictures.

According to an embodiment of the present document, a signaling positionof information about positions of virtual boundaries can be determinedbased on signaling of information about subpictures.

According to an embodiment of the present document, signaling ofinformation related to virtual boundaries can be performed based onsignaling of information related to subpictures.

According to an embodiment of the present document, an encodingapparatus for performing video/image encoding is provided.

According to one embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded video/imageinformation, generated according to the video/image encoding methoddisclosed in at least one of the embodiments of the present document, isstored.

According to an embodiment of the present document, there is provided acomputer-readable digital storage medium in which encoded information orencoded video/image information, causing to perform the video/imagedecoding method disclosed in at least one of the embodiments of thepresent document by the decoding apparatus, is stored.

According to an embodiment of the present document, overall image/videocompression efficiency may be improved.

According to an embodiment of the present document, subjective/objectivevisual quality may be improved through efficient filtering.

According to an embodiment of the present document, efficient coding canbe implemented by omitting a process of rewriting a bitstream throughsignaling-based virtual boundary signaling of subpictures.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 schematically shows an example of a video/image coding system towhich embodiments of the present document may be applied.

FIG. 2 is a view schematically illustrating the configuration of avideo/image encoding apparatus to which embodiments of the presentdocument may be applied.

FIG. 3 is a view schematically illustrating the configuration of avideo/image decoding apparatus to which embodiments of the presentdocument may be applied.

FIG. 4 exemplarily shows a hierarchical architecture for a codedvideo/image.

FIG. 5 illustrates a picture according to an embodiment of the presentdocument.

FIG. 6 illustrates a subpicture/slice/tile-based encoding methodaccording to an embodiment of the present document.

FIG. 7 illustrates a subpicture/slice/tile-based decoding methodaccording to an embodiment of the present document.

FIG. 8 is a flowchart explaining a filtering-based encoding method in anencoding apparatus.

FIG. 9 is a flowchart explaining a filtering-based decoding method in adecoding apparatus.

FIG. 10 and FIG. 11 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

FIG. 12 and FIG. 13 schematically show an example of an image/videodecoding method and related components according to an embodiment(s) ofthe present document.

FIG. 14 shows an example of a content streaming system to whichembodiment(s) disclosed in the present document may be applied.

DESCRIPTION OF EXEMPLARY EMBODIMENTS

This document suggests various embodiments of video/image coding, andthe above embodiments may also be performed in combination with eachother unless otherwise specified.

In this document, a video may refer to a series of images over time. Apicture generally refers to the unit representing one image at aparticular time frame, and a slice/tile refers to the unit constitutinga part of the picture in terms of coding. A slice/tile may include oneor more coding tree units (CTUs). One picture may consist of one or moreslices/tiles. One picture may consist of one or more tile groups. Onetile group may include one or more tiles.

Each configuration of the drawings described in this document is anindependent illustration for explaining functions as features that aredifferent from each other, and does not mean that each configuration isimplemented by mutually different hardware or different software. Forexample, two or more of the configurations can be combined to form oneconfiguration, and one configuration can also be divided into multipleconfigurations. Without departing from the gist of this document,embodiments in which configurations are combined and/or separated areincluded in the scope of claims.

Meanwhile, the present document may be modified in various forms, andspecific embodiments thereof will be described and illustrated in thedrawings. However, the embodiments are not intended for limiting thedocument. The terms used in the following description are used to merelydescribe specific embodiments, but are not intended to limit thedocument. An expression of a singular number includes an expression ofthe plural number, so long as it is clearly read differently. The termssuch as “include” and “have” are intended to indicate that features,numbers, steps, operations, elements, components, or combinationsthereof used in the following description exist and it should be thusunderstood that the possibility of existence or addition of one or moredifferent features, numbers, steps, operations, elements, components, orcombinations thereof is not excluded.

Hereinafter, examples of the present embodiment will be described indetail with reference to the accompanying drawings. In addition, likereference numerals are used to indicate like elements throughout thedrawings, and the same descriptions on the like elements will beomitted.

This document relates to video/image coding. For example,methods/embodiments disclosed in this document may be related to theversatile video coding (VVC) standard (ITU-T Rec. H.266), thenext-generation video/image coding standard after VVC, or other videocoding related standards (e.g., high efficiency video coding (HEVC)standard (ITU-T Rec. H.265), essential video coding (EVC) standard, AVS2standard, and the like).

A pixel or a pel may mean a smallest unit constituting one picture (orimage). Also, ‘sample’ may be used as a term corresponding to a pixel. Asample may generally represent a pixel or a value of a pixel, and mayrepresent only a pixel/pixel value of a luma component or only apixel/pixel value of a chroma component.

A unit may represent a basic unit of image processing. The unit mayinclude at least one of a specific region of the picture and informationrelated to the region. One unit may include one luma block and twochroma (ex. cb, cr) blocks. The unit may be used interchangeably withterms such as block or area in some cases. In a general case, an M×Nblock may include samples (or sample arrays) or a set (or array) oftransform coefficients of M columns and N rows. Alternatively, thesample may mean a pixel value in the spatial domain, and when such apixel value is transformed to the frequency domain, it may mean atransform coefficient in the frequency domain.

In this document, the term “I” and “,” should be interpreted to indicate“and/or.” For instance, the expression “A/B” may mean “A and/or B.”Further, “A, B” may mean “A and/or B.” Further, “A/B/C” may mean “atleast one of A, B, and/or C.” Also, “A/B/C” may mean “at least one of A,B, and/or C.”

Further, in the document, the term “or” should be interpreted toindicate “and/or.” For instance, the expression “A or B” may comprise 1)only A, 2) only B, and/or 3) both A and B. In other words, the term “or”in this document should be interpreted to indicate “additionally oralternatively.”

In the present specification, “at least one of A and B” may mean “onlyA”, “only B”, or “both A and B”. Further, in the present specification,the expression “at least one of A or B” or “at least one of A and/or B”may be interpreted the same as “at least one of A and B”.

Further, in the present specification, “at least one of A, B and C” maymean “only A”, “only B”, “only C”, or “any combination of A, B and C”.Further, “at least one of A, B or C” or “at least one of A, B and/or C”may mean “at least one of A, B and C”.

Further, the parentheses used in the present specification may mean “forexample”. Specifically, in the case that “prediction (intra prediction)”is expressed, it may be indicated that “intra prediction” is proposed asan example of “prediction”. In other words, the term “prediction” in thepresent specification is not limited to “intra prediction”, and it maybe indicated that “intra prediction” is proposed as an example of“prediction”. Further, even in the case that “prediction (i.e., intraprediction)” is expressed, it may be indicated that “intra prediction”is proposed as an example of “prediction”.

In the present specification, technical features individually explainedin one drawing may be individually implemented, or may be simultaneouslyimplemented.

FIG. 1 illustrates an example of a video/image coding system to whichthe document of the present document may be applied.

Referring to FIG. 1 , a video/image coding system may include a sourcedevice and a reception device. The source device may transmit encodedvideo/image information or data to the reception device through adigital storage medium or network in the form of a file or streaming.

The source device may include a video source, an encoding apparatus, anda transmitter. The receiving device may include a receiver, a decodingapparatus, and a renderer. The encoding apparatus may be called avideo/image encoding apparatus, and the decoding apparatus may be calleda video/image decoding apparatus. The transmitter may be included in theencoding apparatus. The receiver may be included in the decodingapparatus. The renderer may include a display, and the display may beconfigured as a separate device or an external component.

The video source may acquire video/image through a process of capturing,synthesizing, or generating the video/image. The video source mayinclude a video/image capture device and/or a video/image generatingdevice. The video/image capture device may include, for example, one ormore cameras, video/image archives including previously capturedvideo/images, and the like. The video/image generating device mayinclude, for example, computers, tablets and smartphones, and may(electronically) generate video/images. For example, a virtualvideo/image may be generated through a computer or the like. In thiscase, the video/image capturing process may be replaced by a process ofgenerating related data.

The encoding apparatus may encode input video/image. The encodingapparatus may perform a series of processes such as prediction,transform, and quantization for compaction and coding efficiency. Theencoded data (encoded video/image information) may be output in the formof a bitstream.

The transmitter may transmit the encoded image/image information or dataoutput in the form of a bitstream to the receiver of the receivingdevice through a digital storage medium or a network in the form of afile or streaming. The digital storage medium may include variousstorage mediums such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, and thelike. The transmitter may include an element for generating a media filethrough a predetermined file format and may include an element fortransmission through a broadcast/communication network. The receiver mayreceive/extract the bitstream and transmit the received bitstream to thedecoding apparatus.

The decoding apparatus may decode the video/image by performing a seriesof processes such as dequantization, inverse transform, and predictioncorresponding to the operation of the encoding apparatus.

The renderer may render the decoded video/image. The renderedvideo/image may be displayed through the display.

FIG. 2 is a diagram schematically illustrating the configuration of avideo/image encoding apparatus to which the document of the presentdocument may be applied. Hereinafter, what is referred to as the videoencoding apparatus may include an image encoding apparatus.

Referring to FIG. 2 , the encoding apparatus 200 may include and beconfigured with an image partitioner 210, a predictor 220, a residualprocessor 230, an entropy encoder 240, an adder 250, a filter 260, and amemory 270. The predictor 220 may include an inter predictor 221 and anintra predictor 222. The residual processor 230 may include atransformer 232, a quantizer 233, a dequantizer 234, and an inversetransformer 235. The residual processor 230 may further include asubtractor 231. The adder 250 may be called a reconstructor orreconstructed block generator. The image partitioner 210, the predictor220, the residual processor 230, the entropy encoder 240, the adder 250,and the filter 260, which have been described above, may be configuredby one or more hardware components (e.g., encoder chipsets orprocessors) according to an embodiment. In addition, the memory 270 mayinclude a decoded picture buffer (DPB), and may also be configured by adigital storage medium. The hardware component may further include thememory 270 as an internal/external component.

The image partitioner 210 may split an input image (or, picture, frame)input to the encoding apparatus 200 into one or more processing units.As an example, the processing unit may be called a coding unit (CU). Inthis case, the coding unit may be recursively split according to aQuad-tree binary-tree ternary-tree (QTBTTT) structure from a coding treeunit (CTU) or the largest coding unit (LCU). For example, one codingunit may be split into a plurality of coding units of a deeper depthbased on a quad-tree structure, a binary-tree structure, and/or aternary-tree structure. In this case, for example, the quad-treestructure is first applied and the binary-tree structure and/or theternary-tree structure may be later applied. Alternatively, thebinary-tree structure may also be first applied. A coding processaccording to the present document may be performed based on a finalcoding unit which is not split any more. In this case, based on codingefficiency according to image characteristics or the like, the maximumcoding unit may be directly used as the final coding unit, or asnecessary, the coding unit may be recursively split into coding units ofa deeper depth, such that a coding unit having an optimal size may beused as the final coding unit. Here, the coding process may include aprocess such as prediction, transform, and reconstruction to bedescribed later. As another example, the processing unit may furtherinclude a prediction unit (PU) or a transform unit (TU). In this case,each of the prediction unit and the transform unit may be split orpartitioned from the aforementioned final coding unit. The predictionunit may be a unit of sample prediction, and the transform unit may be aunit for inducing a transform coefficient and/or a unit for inducing aresidual signal from the transform coefficient.

The unit may be interchangeably used with the term such as a block or anarea in some cases. Generally, an M×N block may represent samplescomposed of M columns and N rows or a group of transform coefficients.The sample may generally represent a pixel or a value of the pixel, andmay also represent only the pixel/pixel value of a luma component, andalso represent only the pixel/pixel value of a chroma component. Thesample may be used as the term corresponding to a pixel or a pelconfiguring one picture (or image).

The subtractor 231 may generate a residual signal (residual block,residual samples, or residual sample array) by subtracting a predictionsignal (predicted block, prediction samples, or prediction sample array)output from the predictor 220 from an input image signal (originalblock, original samples, or original sample array), and the generatedresidual signal is transmitted to the transformer 232. The predictor 220may perform prediction for a processing target block (hereinafter,referred to as a “current block”), and generate a predicted blockincluding prediction samples for the current block. The predictor 220may determine whether intra prediction or inter prediction is applied ona current block or in a CU unit. As described later in the descriptionof each prediction mode, the predictor may generate various kinds ofinformation related to prediction, such as prediction mode information,and transfer the generated information to the entropy encoder 240. Theinformation on the prediction may be encoded in the entropy encoder 240and output in the form of a bitstream.

The intra predictor 222 may predict a current block with reference tosamples within a current picture. The referenced samples may be locatedneighboring to the current block, or may also be located away from thecurrent block according to the prediction mode. The prediction modes inthe intra prediction may include a plurality of non-directional modesand a plurality of directional modes. The non-directional mode mayinclude, for example, a DC mode or a planar mode. The directional modemay include, for example, 33 directional prediction modes or 65directional prediction modes according to the fine degree of theprediction direction. However, this is illustrative and the directionalprediction modes which are more or less than the above number may beused according to the setting. The intra predictor 222 may alsodetermine the prediction mode applied to the current block using theprediction mode applied to the neighboring block.

The inter predictor 221 may induce a predicted block of the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. At this time, in order to decreasethe amount of motion information transmitted in the inter predictionmode, the motion information may be predicted in units of a block, asub-block, or a sample based on the correlation of the motioninformation between the neighboring block and the current block. Themotion information may include a motion vector and a reference pictureindex. The motion information may further include inter predictiondirection (L0 prediction, L1 prediction, Bi prediction, or the like)information. In the case of the inter prediction, the neighboring blockmay include a spatial neighboring block existing within the currentpicture and a temporal neighboring block existing in the referencepicture. The reference picture including the reference block and thereference picture including the temporal neighboring block may also bethe same as each other, and may also be different from each other. Thetemporal neighboring block may be called the name such as a collocatedreference block, a collocated CU (colCU), or the like, and the referencepicture including the temporal neighboring block may also be called acollocated picture (colPic). For example, the inter predictor 221 mayconfigure a motion information candidate list based on the neighboringblocks, and generate information indicating what candidate is used toderive the motion vector and/or the reference picture index of thecurrent block. The inter prediction may be performed based on variousprediction modes, and for example, in the case of a skip mode and amerge mode, the inter predictor 221 may use the motion information ofthe neighboring block as the motion information of the current block. Inthe case of the skip mode, the residual signal may not be transmittedunlike the merge mode. A motion vector prediction (MVP) mode mayindicate the motion vector of the current block by using the motionvector of the neighboring block as a motion vector predictor, andsignaling a motion vector difference.

The predictor 220 may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply both intra prediction and inter prediction.This may be called combined inter and intra prediction (CIIP). Inaddition, the predictor may perform an intra block copy (IBC) forprediction of a block. The intra block copy may be used for contentimage/moving image coding of a game or the like, for example, screencontent coding (SCC). The IBC basically performs prediction in thecurrent picture, but may be performed similarly to inter prediction inthat a reference block is derived in the current picture. That is, theIBC may use at least one of inter prediction techniques described in thepresent document.

The prediction signal generated through the inter predictor 221 and/orthe intra predictor 222 may be used to generate a reconstructed signalor to generate a residual signal. The transformer 232 may generatetransform coefficients by applying a transform technique to the residualsignal. For example, the transform technique may include at least one ofa discrete cosine transform (DCT), a discrete sine transform (DST), agraph-based transform (GBT), or a conditionally non-linear transform(CNT). Here, the GBT means transform obtained from a graph whenrelationship information between pixels is represented by the graph. TheCNT refers to the transform obtained based on a prediction signalgenerated using all previously reconstructed pixels. In addition, thetransform process may be applied to square pixel blocks having the samesize, or may be applied to blocks having a variable size rather than asquare.

The quantizer 233 may quantize the transform coefficients and transmitthem to the entropy encoder 240, and the entropy encoder 240 may encodethe quantized signal (information on the quantized transformcoefficients) and output a bitstream. The information on the quantizedtransform coefficients may be referred to as residual information. Thequantizer 233 may rearrange block type quantized transform coefficientsinto a one-dimensional vector form based on a coefficient scanningorder, and generate information on the quantized transform coefficientsbased on the quantized transform coefficients in the one-dimensionalvector form. The entropy encoder 240 may perform various encodingmethods such as, for example, exponential Golomb, context-adaptivevariable length coding (CAVLC), context-adaptive binary arithmeticcoding (CABAC), and the like. The entropy encoder 240 may encodeinformation necessary for video/image reconstruction together with orseparately from the quantized transform coefficients (e.g., values ofsyntax elements and the like). Encoded information (e.g., encodedvideo/image information) may be transmitted or stored in the unit of anetwork abstraction layer (NAL) in the form of a bitstream. Thevideo/image information may further include information on variousparameter sets, such as an adaptation parameter set (APS), a pictureparameter set (PPS), a sequence parameter set (SPS), or a videoparameter set (VPS). In addition, the video/image information mayfurther include general constraint information. In the present document,information and/or syntax elements being signaled/transmitted to bedescribed later may be encoded through the above-described encodingprocess, and be included in the bitstream. The bitstream may betransmitted through a network, or may be stored in a digital storagemedium. Here, the network may include a broadcasting network and/or acommunication network, and the digital storage medium may includevarious storage media, such as USB, SD, CD, DVD, Blu-ray, HDD, SSD, andthe like. A transmitter (not illustrated) transmitting a signal outputfrom the entropy encoder 240 and/or a storage unit (not illustrated)storing the signal may be configured as an internal/external element ofthe encoding apparatus 200, and alternatively, the transmitter may beincluded in the entropy encoder 240.

The quantized transform coefficients output from the quantizer 233 maybe used to generate a prediction signal. For example, the residualsignal (residual block or residual samples) may be reconstructed byapplying dequantization and inverse transform to the quantized transformcoefficients through the dequantizer 234 and the inverse transformer235. The adder 250 adds the reconstructed residual signal to theprediction signal output from the predictor 220 to generate areconstructed signal (reconstructed picture, reconstructed block,reconstructed samples, or reconstructed sample array). If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock. The generated reconstructed signal may be used for intraprediction of a next processing target block in the current picture, andmay be used for inter prediction of a next picture through filtering asdescribed below.

Meanwhile, luma mapping with chroma scaling (LMCS) may be applied duringa picture encoding and/or reconstruction process.

The filter 260 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter260 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 270, specifically, in a DPB of thememory 270. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset (SAO), an adaptive loopfilter, a bilateral filter, and the like. The filter 260 may generatevarious kinds of information related to the filtering, and transfer thegenerated information to the entropy encoder 290 as described later inthe description of each filtering method. The information related to thefiltering may be encoded by the entropy encoder 290 and output in theform of a bitstream.

The modified reconstructed picture transmitted to the memory 270 may beused as a reference picture in the inter predictor 221. When the interprediction is applied through the encoding apparatus, predictionmismatch between the encoding apparatus 200 and the decoding apparatuscan be avoided and encoding efficiency can be improved.

The DPB of the memory 270 may store the modified reconstructed picturefor use as the reference picture in the inter predictor 221. The memory270 may store motion information of a block from which the motioninformation in the current picture is derived (or encoded) and/or motioninformation of blocks in the picture, having already been reconstructed.The stored motion information may be transferred to the inter predictor221 to be utilized as motion information of the spatial neighboringblock or motion information of the temporal neighboring block. Thememory 270 may store reconstructed samples of reconstructed blocks inthe current picture, and may transfer the reconstructed samples to theintra predictor 222.

FIG. 3 is a diagram for schematically explaining the configuration of avideo/image decoding apparatus to which the document of the presentdocument may be applied.

Referring to FIG. 3 , the decoding apparatus 300 may include andconfigured with an entropy decoder 310, a residual processor 320, apredictor 330, an adder 340, a filter 350, and a memory 360. Thepredictor 330 may include an inter predictor 331 and an intra predictor332. The residual processor 320 may include a dequantizer 321 and aninverse transformer 322. The entropy decoder 310, the residual processor320, the predictor 330, the adder 340, and the filter 350, which havebeen described above, may be configured by one or more hardwarecomponents (e.g., decoder chipsets or processors) according to anembodiment. Further, the memory 360 may include a decoded picture buffer(DPB), and may be configured by a digital storage medium. The hardwarecomponent may further include the memory 360 as an internal/externalcomponent.

When the bitstream including the video/image information is input, thedecoding apparatus 300 may reconstruct the image in response to aprocess in which the video/image information is processed in theencoding apparatus illustrated in FIG. 2 . For example, the decodingapparatus 300 may derive the units/blocks based on block split-relatedinformation acquired from the bitstream. The decoding apparatus 300 mayperform decoding using the processing unit applied to the encodingapparatus. Therefore, the processing unit for the decoding may be, forexample, a coding unit, and the coding unit may be split according tothe quad-tree structure, the binary-tree structure, and/or theternary-tree structure from the coding tree unit or the maximum codingunit. One or more transform units may be derived from the coding unit.In addition, the reconstructed image signal decoded and output throughthe decoding apparatus 300 may be reproduced through a reproducingapparatus.

The decoding apparatus 300 may receive a signal output from the encodingapparatus of FIG. 2 in the form of a bitstream, and the received signalmay be decoded through the entropy decoder 310. For example, the entropydecoder 310 may parse the bitstream to derive information (e.g.,video/image information) necessary for image reconstruction (or picturereconstruction). The video/image information may further includeinformation on various parameter sets such as an adaptation parameterset (APS), a picture parameter set (PPS), a sequence parameter set(SPS), or a video parameter set (VPS). In addition, the video/imageinformation may further include general constraint information. Thedecoding apparatus may further decode picture based on the informationon the parameter set and/or the general constraint information.Signaled/received information and/or syntax elements described later inthis document may be decoded may decode the decoding process andobtained from the bitstream. For example, the entropy decoder 310decodes the information in the bitstream based on a coding method suchas exponential Golomb coding, CAVLC, or CABAC, and output syntaxelements required for image reconstruction and quantized values oftransform coefficients for residual. More specifically, the CABACentropy decoding method may receive a bin corresponding to each syntaxelement in the bitstream, determine a context model by using a decodingtarget syntax element information, decoding information of a decodingtarget block or information of a symbol/bin decoded in a previous stage,and perform an arithmetic decoding on the bin by predicting aprobability of occurrence of a bin according to the determined contextmodel, and generate a symbol corresponding to the value of each syntaxelement. In this case, the CABAC entropy decoding method may update thecontext model by using the information of the decoded symbol/bin for acontext model of a next symbol/bin after determining the context model.The information related to the prediction among the information decodedby the entropy decoder 310 may be provided to the predictor 330, andinformation on the residual on which the entropy decoding has beenperformed in the entropy decoder 310, that is, the quantized transformcoefficients and related parameter information, may be input to thedequantizer 321. In addition, information on filtering among informationdecoded by the entropy decoder 310 may be provided to the filter 350.Meanwhile, a receiver (not illustrated) for receiving a signal outputfrom the encoding apparatus may be further configured as aninternal/external element of the decoding apparatus 300, or the receivermay be a constituent element of the entropy decoder 310. Meanwhile, thedecoding apparatus according to the present document may be referred toas a video/image/picture decoding apparatus, and the decoding apparatusmay be classified into an information decoder (video/image/pictureinformation decoder) and a sample decoder (video/image/picture sampledecoder). The information decoder may include the entropy decoder 310,and the sample decoder may include at least one of the dequantizer 321,the inverse transformer 322, the predictor 330, the adder 340, thefilter 350, and the memory 360.

The dequantizer 321 may dequantize the quantized transform coefficientsto output the transform coefficients. The dequantizer 321 may rearrangethe quantized transform coefficients in a two-dimensional block form. Inthis case, the rearrangement may be performed based on a coefficientscan order performed by the encoding apparatus. The dequantizer 321 mayperform dequantization for the quantized transform coefficients using aquantization parameter (e.g., quantization step size information), andacquire the transform coefficients.

The inverse transformer 322 inversely transforms the transformcoefficients to acquire the residual signal (residual block, residualsample array).

The predictor 330 may perform the prediction of the current block, andgenerate a predicted block including the prediction samples of thecurrent block. The predictor may determine whether the intra predictionis applied or the inter prediction is applied to the current block basedon the information about prediction output from the entropy decoder 310,and determine a specific intra/inter prediction mode.

The predictor may generate a prediction signal based on variousprediction methods described below. For example, the predictor may notonly apply intra prediction or inter prediction to predict one block butalso simultaneously apply intra prediction and inter prediction. Thismay be called combined inter and intra prediction (CIIP). In addition,the predictor may perform an intra block copy (IBC) for prediction of ablock. The intra block copy may be used for content image/moving imagecoding of a game or the like, for example, screen content coding (SCC).The IBC basically performs prediction in the current picture, but may beperformed similarly to inter prediction in that a reference block isderived in the current picture. That is, the IBC may use at least one ofinter prediction techniques described in the present document.

The intra predictor 332 may predict the current block by referring tothe samples in the current picture. The referred samples may be locatedin the neighborhood of the current block, or may be located apart fromthe current block according to the prediction mode. In intra prediction,prediction modes may include a plurality of non-directional modes and aplurality of directional modes. The intra predictor 332 may determinethe prediction mode to be applied to the current block by using theprediction mode applied to the neighboring block.

The inter predictor 331 may derive a predicted block for the currentblock based on a reference block (reference sample array) specified by amotion vector on a reference picture. In this case, in order to reducethe amount of motion information being transmitted in the interprediction mode, motion information may be predicted in the unit ofblocks, subblocks, or samples based on correlation of motion informationbetween the neighboring block and the current block. The motioninformation may include a motion vector and a reference picture index.The motion information may further include information on interprediction direction (L0 prediction, L1 prediction, Bi prediction, andthe like). In case of inter prediction, the neighboring block mayinclude a spatial neighboring block existing in the current picture anda temporal neighboring block existing in the reference picture. Forexample, the inter predictor 331 may construct a motion informationcandidate list based on neighboring blocks, and derive a motion vectorof the current block and/or a reference picture index based on thereceived candidate selection information. Inter prediction may beperformed based on various prediction modes, and the information on theprediction may include information indicating a mode of inter predictionfor the current block.

The adder 340 may generate a reconstructed signal (reconstructedpicture, reconstructed block, or reconstructed sample array) by addingthe obtained residual signal to the prediction signal (predicted blockor predicted sample array) output from the predictor 330. If there is noresidual for the processing target block, such as a case that a skipmode is applied, the predicted block may be used as the reconstructedblock.

The adder 340 may be called a reconstructor or a reconstructed blockgenerator. The generated reconstructed signal may be used for the intraprediction of a next block to be processed in the current picture, andas described later, may also be output through filtering or may also beused for the inter prediction of a next picture.

Meanwhile, a luma mapping with chroma scaling (LMCS) may also be appliedin the picture decoding process.

The filter 350 may improve subjective/objective image quality byapplying filtering to the reconstructed signal. For example, the filter350 may generate a modified reconstructed picture by applying variousfiltering methods to the reconstructed picture, and store the modifiedreconstructed picture in the memory 360, specifically, in a DPB of thememory 360. The various filtering methods may include, for example,deblocking filtering, a sample adaptive offset, an adaptive loop filter,a bilateral filter, and the like.

The (modified) reconstructed picture stored in the DPB of the memory 360may be used as a reference picture in the inter predictor 331. Thememory 360 may store the motion information of the block from which themotion information in the current picture is derived (or decoded) and/orthe motion information of the blocks in the picture having already beenreconstructed. The stored motion information may be transferred to theinter predictor 331 so as to be utilized as the motion information ofthe spatial neighboring block or the motion information of the temporalneighboring block. The memory 360 may store reconstructed samples ofreconstructed blocks in the current picture, and transfer thereconstructed samples to the intra predictor 332.

In the present specification, the embodiments described in the predictor330, the dequantizer 321, the inverse transformer 322, and the filter350 of the decoding apparatus 300 may also be applied in the same manneror corresponding to the predictor 220, the dequantizer 234, the inversetransformer 235, and the filter 260 of the encoding apparatus 200.

Meanwhile, as described above, in performing video coding, prediction isperformed to improve compression efficiency. Through this, a predictedblock including prediction samples for a current block as a block to becoded (i.e., a coding target block) may be generated. Here, thepredicted block includes prediction samples in a spatial domain (orpixel domain). The predicted block is derived in the same manner in anencoding apparatus and a decoding apparatus, and the encoding apparatusmay signal information (residual information) on residual between theoriginal block and the predicted block, rather than an original samplevalue of an original block, to the decoding apparatus, therebyincreasing image coding efficiency. The decoding apparatus may derive aresidual block including residual samples based on the residualinformation, add the residual block and the predicted block to generatereconstructed blocks including reconstructed samples, and generate areconstructed picture including the reconstructed blocks.

The residual information may be generated through a transform andquantization process. For example, the encoding apparatus may derive aresidual block between the original block and the predicted block,perform a transform process on residual samples (residual sample array)included in the residual block to derive transform coefficients, performa quantization process on the transform coefficients to derive quantizedtransform coefficients, and signal related residual information to thedecoding apparatus (through a bit stream). Here, the residualinformation may include value information of the quantized transformcoefficients, location information, a transform technique, a transformkernel, a quantization parameter, and the like. The decoding apparatusmay perform dequantization/inverse transform process based on theresidual information and derive residual samples (or residual blocks).The decoding apparatus may generate a reconstructed picture based on thepredicted block and the residual block. Also, for reference for interprediction of a picture afterward, the encoding apparatus may alsodequantize/inverse-transform the quantized transform coefficients toderive a residual block and generate a reconstructed picture basedthereon.

In this document, at least one of quantization/dequantization and/ortransform/inverse transform may be omitted. When thequantization/dequantization is omitted, the quantized transformcoefficient may be referred to as a transform coefficient. When thetransform/inverse transform is omitted, the transform coefficient may becalled a coefficient or a residual coefficient or may still be calledthe transform coefficient for uniformity of expression.

In this document, the quantized transform coefficient and the transformcoefficient may be referred to as a transform coefficient and a scaledtransform coefficient, respectively. In this case, the residualinformation may include information on transform coefficient(s), and theinformation on the transform coefficient(s) may be signaled throughresidual coding syntax. Transform coefficients may be derived based onthe residual information (or information on the transformcoefficient(s)), and scaled transform coefficients may be derivedthrough inverse transform (scaling) on the transform coefficients.Residual samples may be derived based on inverse transform (transform)of the scaled transform coefficients. This may be applied/expressed inother parts of this document as well.

The predictor of the encoding apparatus/decoding apparatus may deriveprediction samples by performing inter prediction in units of blocks.Inter prediction can be a prediction derived in a manner that isdependent on data elements (e.g. sample values or motion information) ofpicture(s) other than the current picture. When the inter prediction isapplied to the current block, based on the reference block (referencesample arrays) specified by the motion vector on the reference picturepointed to by the reference picture index, the predicted block(prediction sample arrays) for the current block can be derived. In thiscase, in order to reduce the amount of motion information transmitted inthe inter prediction mode, the motion information of the current blockmay be predicted in units of blocks, subblocks, or samples based on thecorrelation between the motion information between neighboring blocksand the current block. The motion information may include the motionvector and the reference picture index. The motion information mayfurther include inter prediction type (L0 prediction, L1 prediction, Biprediction, etc.) information. When the inter prediction is applied, theneighboring blocks may include a spatial neighboring block existing inthe current picture and a temporal neighboring block existing in thereference picture. The reference picture including the reference blockand the reference picture including the temporal neighboring block maybe the same or different. The temporal neighboring block may be called acollocated reference block, a collocated CU (colCU), etc., and areference picture including the temporally neighboring block may becalled a collocated picture (colPic). For example, a motion informationcandidate list may be constructed based on neighboring blocks of thecurrent block, and a flag or index information indicating whichcandidate is selected (used) to derive the motion vector and/or thereference picture index of the current block may be signaled. The interprediction may be performed based on various prediction modes. Forexample, in the skip mode and the merge mode, the motion information ofthe current block may be the same as the motion information of aselected neighboring block. In the skip mode, unlike the merge mode, aresidual signal may not be transmitted. In the case of a motion vectorprediction (MVP) mode, a motion vector of a selected neighboring blockmay be used as a motion vector predictor, and a motion vector differencemay be signaled. In this case, the motion vector of the current blockmay be derived using the sum of the motion vector predictor and themotion vector difference.

The motion information may include L0 motion information and/or L1motion information according to an inter prediction type (L0 prediction,L1 prediction, Bi prediction, etc.). A motion vector in the L0 directionmay be referred to as an L0 motion vector or MVL0, and a motion vectorin the L1 direction may be referred to as an L1 motion vector or MVL1.The prediction based on the L0 motion vector may be called L0prediction, the prediction based on the L1 motion vector may be calledthe L1 prediction, and the prediction based on both the L0 motion vectorand the L1 motion vector may be called a bi-prediction. Here, the L0motion vector may indicate a motion vector associated with the referencepicture list L0 (L0), and the L1 motion vector may indicate a motionvector associated with the reference picture list L1 (L1). The referencepicture list L0 may include pictures that are previous than the currentpicture in output order as reference pictures, and the reference picturelist L1 may include pictures that are subsequent than the currentpicture in output order. The previous pictures may be called forward(reference) pictures, and the subsequent pictures may be called backward(reference) pictures. The reference picture list L0 may further includepictures that are subsequent than the current picture in output order asreference pictures. In this case, the previous pictures may be indexedfirst, and the subsequent pictures may be indexed next in the referencepicture list L0. The reference picture list L1 may further includepictures previous than the current picture in output order as referencepictures. In this case, the subsequent pictures may be indexed first inthe reference picture list 1 and the previous pictures may be indexednext. Here, the output order may correspond to a picture order count(POC) order.

FIG. 4 exemplarily shows a hierarchical structure for a codedimage/video.

Referring to FIG. 4 , the coded image/video is divided into VCL (videocoding layer) that deals with an image/video decoding process anditself, a subsystem that transmits and stores the coded information, anda network abstraction layer (NAL) that exists between the VCL andsubsystems and is responsible for network adaptation functions.

The VCL may generate VCL data including compressed image data (slicedata), or generate parameter sets including a picture parameter set(Picture Parameter Set: PPS), a sequence parameter set (SequenceParameter Set: SPS), a video parameter set (Video Parameter Set: VPS)etc. or a supplemental enhancement information (SEI) messageadditionally necessary for the decoding process of an image.

In the NAL, a NAL unit may be generated by adding header information(NAL unit header) to a raw byte sequence payload (RBSP) generated in theVCL. In this case, the RBSP refers to slice data, parameter sets, SEImessages, etc. generated in the VCL. The NAL unit header may include NALunit type information specified according to RBSP data included in thecorresponding NAL unit.

As shown in the figure, the NAL unit may be divided into a VCL NAL unitand a Non-VCL NAL unit according to the RBSP generated in the VCL. TheVCL NAL unit may mean a NAL unit including information (sliced data)about an image, and the Non-VCL NAL unit may mean a NAL unit containinginformation (parameter set or SEI message) necessary for decoding animage.

The above-described VCL NAL unit and Non-VCL NAL unit may be transmittedthrough a network by attaching header information according to a datastandard of the subsystem. For example, the NAL unit may be transformedinto a data form of a predetermined standard such as H.266/VVC fileformat, Real-time Transport Protocol (RTP), Transport Stream (TS), etc.and transmitted through various networks.

As described above, in the NAL unit, the NAL unit type may be specifiedaccording to the RBSP data structure included in the corresponding NALunit, and information on this NAL unit type may be stored and signaledin the NAL unit header.

For example, the NAL unit may be roughly classified into the VCL NALunit type and the Non-VCL NAL unit type depending on whether the NALunit includes information about the image (slice data). The VCL NAL unittype may be classified according to property and a type of a pictureincluded in the VCL NAL unit, and the Non-VCL NAL unit type may beclassified according to the type of a parameter set.

The following is an example of the NAL unit type specified according tothe type of parameter set included in the Non-VCL NAL unit type.

-   -   APS (Adaptation Parameter Set) NAL unit: Type for NAL unit        including APS    -   DPS (Decoding Parameter Set) NAL unit: Type for NAL unit        including DPS    -   VPS (Video Parameter Set) NAL unit: Type for NAL unit including        VPS    -   SPS (Sequence Parameter Set) NAL unit: Type for NAL unit        including SPS    -   PPS (Picture Parameter Set) NAL unit: Type for NAL unit        including PPS    -   PH (Picture header) NAL unit: Type for NAL unit including PH

The above-described NAL unit types have syntax information for the NALunit type, and the syntax information may be stored and signaled in theNAL unit header. For example, the syntax information may benal_unit_type, and NAL unit types may be specified by a nal_unit_typevalue.

Meanwhile, as described above, one picture may include a plurality ofslices, and one slice may include a slice header and slice data. In thiscase, one picture header may be further added to a plurality of slices(a slice header and a slice data set) in one picture. The picture header(picture header syntax) may include information/parameters commonlyapplicable to the picture. In this document, a slice may be mixed orreplaced with a tile group. Also, in this document, a slice header maybe mixed or replaced with a type group header.

The slice header (slice header syntax or slice header information) mayinclude information/parameters commonly applicable to the slice. The APS(APS syntax) or PPS (PPS syntax) may include information/parameterscommonly applicable to one or more slices or pictures. The SPS (SPSsyntax) may include information/parameters commonly applicable to one ormore sequences. The VPS (VPS syntax) may include information/parameterscommonly applicable to multiple layers. The DPS (DPS syntax) may includeinformation/parameters commonly applicable to the entire video. The DPSmay include information/parameters related to concatenation of a codedvideo sequence (CVS). In this document, high level syntax (HLS) mayinclude at least one of the APS syntax, PPS syntax, SPS syntax, VPSsyntax, DPS syntax, picture header syntax, and slice header syntax.

In this document, the image/video information encoded in the encodingapparatus and signaled in the form of a bitstream to the decodingapparatus may include, as well as picture partitioning-relatedinformation in the picture, intra/inter prediction information, residualinformation, in-loop filtering information, etc. the informationincluded in the slice header, the information included in the pictureheader, the information included in the APS, the information included inthe PPS, the information included in the SPS, the information includedin the VPS, and/or the information included in the DPS. In addition, theimage/video information may further include information of the NAL unitheader.

Meanwhile, in order to compensate for a difference between an originalimage and a reconstructed image due to an error occurring in acompression encoding process such as quantization, an in-loop filteringprocess may be performed on reconstructed samples or reconstructedpictures as described above. As described above, the in-loop filteringmay be performed by the filter of the encoding apparatus and the filterof the decoding apparatus, and a deblocking filter, SAO, and/or adaptiveloop filter (ALF) may be applied. For example, the ALF process may beperformed after the deblocking filtering process and/or the SAO processare completed. However, even in this case, the deblocking filteringprocess and/or the SAO process may be omitted.

Hereinafter, detailed explanation of picture reconstruction andfiltering will be described. In image/video coding, a reconstructedblock may be generated based on intra prediction/inter prediction in theunit of a block, and a reconstructed picture including reconstructedblocks may be generated. If the current picture/slice is an Ipicture/slice, blocks included in the current picture/slice may bereconstructed based on the intra prediction only. Meanwhile, if thecurrent picture/slice is a P or B picture/slice, the blocks included inthe current picture/slice may be reconstructed based on the intraprediction or the inter prediction. In this case, the intra predictionmay be applied to some blocks in the current picture/slice, and theinter prediction may be applied to the remaining blocks.

The intra prediction may represent a prediction for generatingprediction samples for the current block based on reference samples inthe picture (hereinafter, current picture) to which the current blockbelongs. In case that the intra prediction is applied to the currentblock, neighboring reference samples to be used for the intra predictionof the current block may be derived. The neighboring reference samplesof the current block may include a sample adjacent to a left boundary ofthe current block having a size of nW×nH, total 2×nH samples neighboringthe bottom-left, a sample adjacent to the top boundary of the currentblock, total 2×nW samples neighboring the top-right, and one sampleneighboring the top-left of the current block. Alternatively, theneighboring reference samples of the current block may include topneighboring sample of plural columns and left neighboring sample ofplural rows. Alternatively, the neighboring reference samples of thecurrent block may include total nH samples adjacent to the rightboundary of the current block having a size of nW×nH, total nH samplesadjacent to the right boundary of the current block, total nW samplesadjacent to the bottom boundary of the current block, and one sampleneighboring the bottom-right of the current block.

However, some of the neighboring reference samples of the current blockmay have not yet been decoded or may not be available. In this case, thedecoder may configure the neighboring reference samples to be used forthe prediction through substitution of available samples for theunavailable samples. Alternatively, the neighboring reference samples tobe used for the prediction may be configured through interpolation ofthe available samples.

In case that the neighboring reference samples are derived, (i) theprediction sample may be induced based on an average or interpolation ofthe neighboring reference samples of the current block, and (ii) theprediction sample may be induced based on the reference sample that ispresent in a specific (prediction) direction for the prediction sampleamong the neighboring reference samples of the current block. The caseof (i) may be called a non-directional mode or a non-angular mode, andthe case of (ii) may be called a directional mode or an angular mode.Further, the prediction sample may be generated through interpolation ofthe first neighboring sample with the second neighboring sample locatedin an opposite direction to the prediction direction of the intraprediction mode of the current block based on the prediction sample ofthe current block among the neighboring reference samples. Theabove-described case may be called a linear interpolation intraprediction (LIP). Further, chroma prediction samples may be generatedbased on luma samples by using a linear model. This case may be calledan LM mode. Further, a temporary prediction sample of the current blockmay be derived based on the filtered neighboring reference samples, anda prediction sample of the current block may be derived by calculating aweighted sum of the temporary prediction sample and at least onereference sample derived in accordance with the intra prediction modeamong the existing neighboring reference samples, that is, non-filteredneighboring reference samples. The above-described case may be called aposition dependent intra prediction (PDPC). Further, the predictionsample may be derived by using a reference sample located in aprediction direction on a reference sample line having the highestprediction accuracy among neighboring multiple reference sample lines ofthe current block through selection of the corresponding line, and inthis case, intra prediction coding may be performed in a method forindicating (signaling) the used reference sample line to the decodingapparatus. The above-described case may be called multi-reference line(MRL) intra prediction or MRL-based intra prediction. Further, the intraprediction may be performed based on the same intra prediction modethrough division of the current block into vertical or horizontalsubpartitions, and the neighboring reference samples may be derived andused in the unit of a subpartition. That is, in this case, since theintra prediction mode for the current block is equally applied to thesubpartitions, and the neighboring reference samples are derived andused in the unit of the subpartition, the intra prediction performancecan be enhanced in some cases. Such a prediction method may be calledintra subpartitions (ISP) or ISP-based intra prediction. Theabove-described intra prediction method may be called the intraprediction type in distinction from the intra prediction mode inContents 1.2. The intra prediction type may be called by various terms,such as an intra prediction technique or an additional intra predictionmode. For example, the intra prediction type (or additional intraprediction mode) may include at least one of LIP, PDPC, MRL, or ISPdescribed above. A general intra prediction method excluding a specificintra prediction type, such as the LIP, PDPC, MRL, or ISP, may be calleda normal intra prediction type. The normal intra prediction type may begenerally applied in case that the specific intra prediction type is notapplied, and the prediction may be performed based on theabove-described intra prediction mode. Meanwhile, as needed,post-filtering for the derived prediction sample may be performed.

Specifically, the intra prediction process may include steps of intraprediction mode/type determination, neighboring reference samplederivation, and intra prediction mode/type-based prediction samplederivation. Further, as needed, a post-filtering step for the derivedprediction sample may be performed.

A reconstructed picture modified through an in-loop filtering processmay be generated, and the modified reconstructed picture may be outputfrom the decoding apparatus as a decoded picture. Further, the modifiedreconstructed picture may be stored in a decoded picture buffer or amemory of the encoding apparatus/decoding apparatus, and then may beused as a reference picture in the inter prediction process when thepicture is encoded/decoded. As described above, the in-loop filteringprocess may include the deblocking filtering process, the sampleadaptive offset (SAO) process and/or the adaptive loop filter (ALF)process. In this case, one or some of the deblocking filtering process,the sample adaptive offset (SAO) process, the adaptive loop filter (ALF)process, and a bi-lateral filter process may be sequentially applied, orall of the processes may be sequentially applied. For example, after thedeblocking filtering process is applied to the reconstructed picture,the SAO process may be performed. Further, for example, after thedeblocking filtering process is applied to the reconstructed picture,the ALF process may be performed. This may be performed in the samemanner even by the encoding apparatus.

The deblocking filtering is a filtering technique that removesdistortion occurring at the boundary between the blocks in thereconstructed picture. For example, the deblocking filtering process mayderive a target boundary from the reconstructed picture, determine aboundary strength (bS) for the target boundary, and perform thedeblocking filtering for the target boundary based on the bS. The bS maybe determined based on a prediction mode of two blocks adjacent to thetarget boundary, motion vector difference, whether the referencepictures are the same, and whether an effective coefficient that is not0 is present.

The SAO is a method for compensating for an offset difference betweenthe reconstructed picture and the original picture in the unit of asample, and for example, may be applied based on types of band offset,edge offset, and the like. According to the SAO, samples are classifiedinto different categories in accordance with the SAO types, and theoffset values may be added to the respective samples based on thecategories. Filtering information for the SAO may include information onwhether the SAO is applied, SAO type information, and SAO offset valueinformation. The SAO may be applied to the reconstructed picture afterthe deblocking filtering is applied.

The adaptive loop filter (ALF) is a filtering technique in the unit of asample based on filter coefficients in accordance with the filter shapefor the reconstructed picture. The encoding apparatus may determinewhether to apply the ALF, the ALF shape, and/or the ALF filteringcoefficient through comparison of the reconstructed picture and theoriginal picture with each other, and may signal them to the decodingapparatus. That is, the filtering information for the ALF may includeinformation on whether to apply the ALF, ALF filter shape information,and ALF filtering coefficient information. The ALF may also be appliedto the reconstructed picture after the deblocking filtering is applied.

FIG. 5 illustrates a picture according to an embodiment of the presentdocument. An exemplary picture of FIG. 5 may be divided intosubpictures, slices, and tiles.

Referring to FIG. 5 , a picture may be divided into subpictures. Forexample, the subpicture may include one or more slices. The slice mayrepresent a rectangular area of the picture. Further, the picture may bedivided into tiles. For example, a rectangular slice may include only apart (subset) of one tile. That is, in FIG. 5 , two rectangular slicesare within the same tile, and the two rectangular slices may belong todifferent subpictures. Problems caused by the case of FIG. 5 andsolutions thereof will be described later.

In an example, the picture/subpicture may be coded based onsubpicture(s)/slice(s)/tile(s). The encoding apparatus may encode acurrent picture based on the subpicture/slice/tile structure, or theencoding apparatus may encode one or more subpictures (includingslices/tiles) of the current picture, and may output a (sub)bitstreamincluding (encoded) information about the subpicture. The decodingapparatus may decode one or more subpictures in the current picturebased on the (sub)bitstream including the (encoded) information for thesubpicture(s)/slice(s)/tile(s).

FIG. 6 illustrates a subpicture/slice/tile-based encoding methodaccording to an embodiment of the present document.

The encoder may divide an (input) picture into a plurality of (or one ormore) subpicture(s)/slice(s)/tile(s). Each subpicture may beindividually/independently encoded, and a bitstream may be output. Here,the bitstream for the subpicture may be called a sub-stream, subset, orsub-bitstream. Information about subpicture/slice/tile may includeinformation/syntax element(s) described in the present document. Forexample, information about the slice may include information related tothe number of slices being signaled for each picture/subpicture, and thewidth/height of the slices in the tiles. For example, information aboutthe tile may include information related to the number of tiles (e.g.,the number of tile columns and/or the number of tile rows) andinformation related to the size of each tile (e.g., width and/orheight).

The encoder may encode one or more subpictures as information about thesubpicture. The encoder may encode one or more slices/tiles asinformation about the slice/tile.

FIG. 7 illustrates a subpicture/slice/tile-based decoding methodaccording to an embodiment of the present document.

The decoder may decode one or more subpictures (including slices/tiles),and may output one or more decoded subpicture(s) or a current pictureincluding the subpictures. The bitstream may include sub-stream(s) orsub-bitstream(s) for the subpicture(s). As described above, theinformation about the subpicture/slice/tile may be configured in a highlevel syntax (HLS) included in the bitstream. The decoder may derive oneor more subpictures based on the information about the subpicture. Thedecoder may derive one or more slices/tiles based on the informationabout the slice/tile. The decoder may decode all or some of thesubpictures. The decoder may decode the subpicture (including thecurrent block (or CU)), CTU, slice, and/or tile based on the CABAC,prediction, residual processing (transform and quantization), andin-loop filtering. Accordingly, decoded subpicture(s) may be output. Thedecoded subpicture(s) may include reconstructed/decoded block(s). Thedecoded subpictures in an output subpicture set (OPS) may be outputtogether. As an example, if the picture is related to 360-degree oromnidirectional image/video, some of them may be rendered, and in thiscase, only some of all subpictures may be decoded, and some or all ofthe decoded subpictures may be rendered in accordance with a userviewport or viewing position. In addition, if information indicating(representing) whether in-loop filtering is enabled across subpictureboundaries is enabled, the decoder may apply the in-loop filteringprocess (e.g., deblocking filtering) with respect to the subpictureboundary positioned between two subpictures. For example, if thesubpicture boundary is the same as a picture boundary, the in-loopfiltering process for the subpicture boundaries may be applied or maynot be performed.

In embodiments of the present document, the image/video information mayinclude the HLS, and the HLS may include the information about thesubpicture(s)/slice(s)/tile(s). The information about the subpicture(s)may include information representing one or more subpictures in thecurrent picture. The information about the slice(s) may includeinformation representing one or more slices in the current picture,subpicture, or tile. The information about the tile(s) may includeinformation representing one or more tiles in the current picture,subpicture, or slice. The picture may include a tile including one ormore slices and/or a slice including one or more tiles. Further, thepicture may include a subpicture including one or more slices/tiles.

The following tables represent syntax related to the above-describedpicture division (subpicture/slice/tile). Information about thesubpicture(s)/slice(s)/tile(s) may include syntax elements in thefollowing tables.

The next table represents syntax of a sequence parameter set (SPS) basedon the picture division (subpicture/slice/tile).

TABLE 1 Descriptor seq_parameter_set_rbsp( ) {  ... subpics_present_flag u(1)  if( subpics_present_flag ) {  sps_num_subpics_minus1 u(8)   for( i = 0; i <= sps_num_subpics_minus1;i++ ) {    subpic_ctu_top_left_x[ i ] u(v)    subpic_ctu_top_left_y[ i ]u(v)    subpic_width_minus1[ i ] u(v)    subpic_height_minus1[ i ] u(v)   subpic_treated_as_pic_flag[ i ] u(1)   loop_filter_across_subpic_enabled_flag[ i ] u(1)   }  }  ... }

The next table represents syntax of a picture parameter set (PPS) basedon the picture division (subpicture/slice/tile).

TABLE 2 Descriptor pic_parameter_set_rbsp( ) {  ... no_pic_partition_flag u(1)  if( !no_pic_partition_flag ) {  pps_log2_ctu_size_minus5 u(2)   num_exp_tile_columns_minus1 ue(v)  num_exp_tile_rows_minus1 ue(v)   for( i = 0; i <=num_exp_tile_columns_minus1; i++ )    tile_column_width_minus1[ i ]ue(v)   for( i = 0; i <= num_exp_tile_rows_minus1; i++ )   tile_row_height_minus1[ i ] ue(v)   rect_slice_flag u(1)   if(rect_slice_flag )    single_slice_per_subpic_flag u(1)   if(rect_slice_flag && !single_slice_per_subpic_flag ) {   num_slices_in_pic_minus1 ue(v)    tile_idx_delta_present_flag u(1)   for( i = 0; i < num_slices_in_pic_minus1; i++ ) {    slice_width_in_tiles_minus1[ i ] ue(v)    slice_height_in_tiles_minus1[ i ] ue(v)     if(slice_width_in_tiles_minus1[ i ] = = 0 &&       slice_height_in_tiles_minus1[ i ] = = 0 ) {     num_slices_in_tile_minus1[ i ] ue(v)      numSlicesInTileMinus1 =num_slices_in_tile_minus1[ i ]      for( j = 0; j <numSlicesInTileMinus1; j++ )       slice_height_in_etu_minus1[ i++ ]ue(v)     }     if( tile_idx_delta_present_flag && i <num_slices_in_pic_minus1 )      tile_idx_delta[ i ] se(v)    }   }  loop_filter_across_tiles_enabled_flag u(1)  loop_filter_across_slices_enabled_flag u(1)  }  ... }

The next table represents syntax of a slice header based on the picturedivision (subpicture/slice/tile).

TABLE 3 Descriptor slice_header( ) {  ...  if( rect_slice_flag | |NumTilesInPic > 1 )   slice_address u(v)  if( !rect_slice_flag &&NumTilesInPic > 1 )   num_tiles_in_slice_minus1 ue(v)  ... }

FIG. 8 is a flowchart explaining a filtering-based encoding method in anencoding apparatus. The method of FIG. 8 may include steps S800 to S830.

In step S800, the encoding apparatus may generate a reconstructedpicture. The step S800 may be performed based on the above-describedprocess of generating reconstructed picture (or reconstructed samples).

In step S810, the encoding apparatus may determine whether in-loopfiltering is applied (across a virtual boundary) based on in-loopfiltering related information. Here, the in-loop filtering may includeat least one of the above-described deblocking filtering, SAO, or ALF.

In step S820, the encoding apparatus may generate a modifiedreconstructed picture (modified reconstructed samples) based on thedetermination in step S810. Here, the modified reconstructed picture(modified reconstructed samples) may be the filtered reconstructedpicture (filtered reconstructed samples).

In step S830, the encoding apparatus may encode image/video informationincluding in-loop filtering related information based on the in-loopfiltering process.

FIG. 9 is a flowchart explaining a filtering-based decoding method in adecoding apparatus. The method of FIG. 9 may include steps S900 to S930.

In step S900, the decoding apparatus may obtain image/video informationincluding in-loop filtering related information from the bitstream.Here, the bitstream may be based on the encoded image/video informationtransmitted from the encoding apparatus.

In step S910, the decoding apparatus may generate a reconstructedpicture. The step S910 may be performed based on the above-describedprocess of generating the reconstructed picture (or reconstructedsamples).

In step S920, the decoding apparatus may determine whether the in-loopfiltering is applied (across the virtual boundary) based on the in-loopfiltering related information. Here, the in-loop filtering may includeat least one of the above-described deblocking filtering, SAO, or ALF.

In step S930, the decoding apparatus may generate the modifiedreconstructed picture (modified reconstructed samples) based on thedetermination in step S920. Here, the modified reconstructed picture(modified reconstructed samples) may be the filtered reconstructedpicture (filtered reconstructed samples).

As described above, the in-loop filtering process may be applied to thereconstructed picture. In this case, in order to further enhance thesubjective/objective visual quality of the reconstructed picture, avirtual boundary may be defined, and the in-loop filtering process maybe applied across the virtual boundary. For example, the virtualboundary may include a discontinuous edge, such as 360-degree image, VRimage, or picture in picture (PIP). For example, the virtual boundarymay exist at a predetermined engaged position, and theexistence/inexistence and/or the position thereof may be signaled. As anexample, the virtual boundary may be positioned on an upper fourthsample line of the CTU row (specifically for example, top of the upperfourth sample line of the CTU row). As another example, informationabout the existence/inexistence and/or the position of the virtualboundary may be signaled through the HLS. As described above, the HLSmay include the SPS, PPS, picture header, and slice header.

Hereinafter, high-level syntax signaling and semantics according toembodiments of the present document will be described.

An embodiment of the present document may include a method forcontrolling loop filters. The method for controlling the loop filtersmay be applied to the reconstructed picture. In-loop filters (loopfilters) may be used to decode the encoded bitstreams. The loop filtersmay include the above-described deblocking, SAO, and ALF. The SPS mayinclude flags related to the deblocking, SAO, and ALF, respectively. Theflags may represent whether respective tools are enabled for coding of acoded layer video sequence (CLVS) and a coded video sequence (CVS)referring to the SPS.

If the loop filters are enabled for the CVS, application of the loopfilters may be controlled not to cross specific boundaries. For example,whether the loop filters cross subpicture boundaries may be controlled.Further, whether the loop filters cross tile boundaries may becontrolled. In addition, whether the loop filters cross virtualboundaries may be controlled. Here, the virtual boundaries may bedefined on the CTUs based on the availability of a line buffer.

In relation to whether the in-loop filtering process is performed acrossthe virtual boundary, the in-loop filtering related information mayinclude at least one of an SPS virtual boundary enabled flag (virtualboundary enabled flag in the SPS), an SPS virtual boundary present flag,a picture header virtual boundary present flag, an SPS picture headervirtual boundary present flag, and information about the position of thevirtual boundary.

In embodiments included in the present document, the information aboutthe position of the virtual boundary may include information about xcoordinate of a vertical virtual boundary and information about ycoordinate of a horizontal virtual boundary. Specifically, informationabout the position of the virtual boundary may include information aboutthe x coordinate of the vertical virtual boundary and/or the ycoordinate of the horizontal virtual boundary in the unit of lumasamples. Further, the information about the position of the virtualboundary may include information about the number of information (syntaxelements) about the x coordinate of the vertical virtual boundary thatis present in the SPS. Further, the information about the virtualboundary may include information about the number of information (syntaxelements) about the y coordinate of the horizontal virtual boundary thatis present in the SPS. Further, the information about the position ofthe virtual boundary may include information about the number ofinformation (syntax elements) about the x coordinate of the verticalvirtual boundary that is present in the picture head. Further, theinformation about the position of the virtual boundary may includeinformation about the number of information (syntax elements) about they coordinate of the horizontal virtual boundary that is present in thepicture head.

The following tables represent exemplary syntax and semantics of asequence parameter set (SPS) according to the present embodiment.

TABLE 4 Descriptor seq_parameter_set_rbsp( ) {  ... subpics_present_flag u(1)  if( subpics_present_flag ) {  sps_num_subpics_minus1 u(8)   for( i = 0; i <= sps_num_subpics_minus1;i++ ) {    subpic_ctu_top_left_x[ i ] u(v)    subpic_ctu_top_left_y[ i ]u(v)    subpic_width_minus1[ i ] u(v)    subpic_height_minus1[ i ] u(v)   subpic_treated_as_pic_flag[ i ] u(1)   loop_filter_across_subpic_enabled_flag[ i ] u(1)   }  }  ... sps_sao_enabled_flag u(1)  sps_alf_enabled_flag u(1)  ... sps_loop_filter_across_virtual_boundaries_disabled_present_flag u(1) if( sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {  sps_num_ver_virtual_boundaries u(2)   for( i = 0; i <sps_num_ver_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_x[ i] u(13)   sps_num_hor_virtual_boundaries u(2)   for( i = 0; i <sps_num_hor_virtual_boundaries; i++ )    sps_virtual_boundaries_pos_y[ i] u(13)  }  ... }

TABLE 5 subpics_present_flag equal to 1 specifies that subpictureparameters are present in in the SPS RBSP syntax. subpics_present_flagequal to 0 specifies that subpicture parameters are not present in theSPS RBSP syntax. sps_num_subpics_minus1 plus 1 specifies the number ofsubpictures. sps_num_subpics_minus1 shall be in the range of 0 to 254.When not present, the value of sps_num_subpics_minus1 is inferred to beequal to 0. subpic_ctu_top_left_x[ i ] specifies horizontal position oftop left CTU of i-th subpicture in unit of CtbSizeY. The length of thesyntax element is Ceil( Log2( pic_width_max_in_luma_samples / CtbSizeY )) bits. When not present, the value of subpic_ctu_top_left_x[ i ] isinferred to be equal to 0. subpic_ctu_top_left_y[ i ] specifies verticalposition of top left CTU of i-th subpicture in unit of CtbSizeY. Thelength of the syntax element is Ceil( Log2(pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When not present,the value of subpic_ctu_top_left_y[ i ] is inferred to be equal to 0.subpic_width_minus1[ i ] plus 1 specifies the width of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_width_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_width_minus1[ i ] is inferred to be equalto Ceil( pic_width_max_in_luma_samples / CtbSizeY ) − 1.subpic_height_minus1[ i ] plus 1 specifies the height of the i-thsubpicture in units of CtbSizeY. The length of the syntax element isCeil( Log2( pic_height_max_in_luma_samples / CtbSizeY ) ) bits. When notpresent, the value of subpic_height_minus1[ i ] is inferred to be equalto Ceil( pic_height_max_in_luma_samples / CtbSizeY ) − 1.subpic_treated_as_pic_flag[ i ] equal to 1 specifies that the i-thsubpicture of each coded picture in the CLVS is treated as a picture inthe decoding process excluding in-loop filtering operations.subpic_treated_as_pic_flag[ i ] equal to 0 specifies that the i-thsubpicture of each coded picture in the CLVS is not treated as a picturein the decoding process excluding in-loop filtering operations. When notpresent, the value of subpic_treated_as_pic_flag[ i ] is inferred to beequal to 0. loop_filter_across_subpic_enabled_flag[ i ] equal to 1specifies that in-loop filtering operations may be performed across theboundaries of the i-th subpicture in each coded picture in the CLVS.loop_filter_across_subpic_enabled_flag[ i ] equal to 0 specifies thatin-loop filtering operations are not performed across the boundaries ofthe i-th subpicture in each coded picture in the CLVS. When not present,the value of loop_filter_across_subpic_enabled_pic_flag[ i ] is inferredto be equal to 1.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to1 specifies that the in-loop filtering operations are disabled acrossthe virtual boundaries in pictures referring to the SPS.sps_loop_filter_across_virtual_boundaries_disabled_present_flag equal to0 specifies that no such disabling of in-loop filtering operations isapplied in pictures referring to the SPS. In-loop filtering operationsinclude the deblocking filter, sample adaptive offset filter, andadaptive loop filter operations. sps_sao_enabled_flag equal to 1specifies that the sample adaptive offset process is applied to thereconstructed picture after the deblocking filter process.sps_sao_enabled_flag equal to 0 specifies that the sample adaptiveoffset process is not applied to the reconstructed picture after thedeblocking filter process. sps_alf_enabled_flag equal to 0 specifiesthat the adaptive loop filter is disabled. sps_alf_enabled_flag equal to1 specifies that the adaptive loop filter is enabled.sps_num_ver_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_x[ i ] syntax elements that are present inthe SPS. When sps_num_ver_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of sps_virtual_boundaries_pos_x[ i ] shall be in the range of1 to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.sps_num_hor_virtual_boundaries specifies the number ofsps_virtual_boundaries_pos_y[ i ] syntax elements that are present inthe SPS. When sps_num_hor_virtual_boundaries is not present, it isinferred to be equal to 0. sps_virtual_boundaries_pos_y[ i ] is used tocompute the value of VirtualBoundariesPosY[ i ], which specifies thelocation of the i-th horizontal virtual boundary in units of lumasamples. The value of sps_virtual_boundaries_pos_y[ i ] shall be in therange of 1 to Ceil( pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.

The following tables represent exemplary syntax and semantics of apicture parameter set (PPS) according to the present embodiment.

TABLE 6 Descriptor pic_parameter_set_rbsp( ) {  ... no_pic_partition_flag u(1)  if( !no_pic_partition_flag ) {   ...  loop_filter_across_tiles_enabled_flag u(1)  loop_filter_across_slices_enabled_flag u(1)  }  ... deblocking_filter_control_present_flag u(1)  if(deblocking_filter_control_present flag ) {  deblocking_filter_override_enabled_flag u(1)  pps_deblocking_filter_disabled_flag u(1)   if(!pps_deblocking_filter_disabled flag ) {    pps_beta_offset_div2 se(v)   pps_tc_offset_div2 se(v)   }  }  ... }

TABLE 7 no_pic_partition_flag equal to 1 specifies that no picturepartitioning applied to each picture referring to the PPS.no_pic_partition_flag equal to 0 specifies each picture referring to thePPS may be partitioned into more than one tile or slice.loop_filter_across_tiles_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across tile boundaries in picturesreferring to the PPS. loop_filter_across_tiles_enabled_flag equal to 0specifics that in-loop filtering operations are not performed acrosstile boundaries in pictures referring to the PPS. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations.loop_filter_across_slices_enabled_flag equal to 1 specifies that in-loopfiltering operations may be performed across slice boundaries inpictures referring to the PPS. loop_filter_across_slice_enabled_flagequal to 0 specifies that in-loop filtering operations are not performedacross slice boundaries in pictures referring to the PPS. The in-loopfiltering operations include the deblocking filter, sample adaptiveoffset filter, and adaptive loop filter operations.deblocking_filter_control_present_flag equal to 1 specifies the presenceof deblocking filter control syntax elements in the PPS.deblocking_filter_control_present_flag equal to 0 specifies the absenceof deblocking filter control syntax elements in the PPS.deblocking_filter_override_enabled_flag equal to 1 specifies thepresence of pic_deblocking_filter_override_flag in the PHs referring tothe PPS or slice_deblocking_filter_override_flag in the slice headersreferring to the PPS. deblocking_filter_override_enabled_flag equal to 0specifies the absence of pic_deblocking_filter_override_flag in PHsreferring to the PPS or slice_deblocking_filter_override_flag in sliceheaders referring to the PPS. When not present, the value ofdeblocking_filter_override_enabled_flag is inferred to be equal to 0.pps_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of deblocking filter is not applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.pps_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for slices referring tothe PPS in which slice_deblocking_filter_disabled_flag is not present.When not present, the value of pps_deblocking_filter_disabled_flag isinferred to be equal to 0. pps_beta_offset_div2 and pps_tc_offset_div2specify the default deblocking parameter offsets for β and tC (dividedby 2) that are applied for slices referring to the PPS, unless thedefault deblocking parameter offsets are overridden by the deblockingparameter offsets present in the slice headers of the slices referringto the PPS. The values of pps_beta_offset_div2 and pps_tc_offset_div2shall both be in the range of −6 to 6, inclusive. When not present, thevalue of pps_beta_offset_div2 and pps_tc_offset_div2 are inferred to beequal to 0.

The following tables represent exemplary syntax and semantics of apicture header according to the present embodiment.

TABLE 8 Descriptor picture_header_rbsp( ) {  ...  if(!sps_loop_filter_across_virtual_boundaries_disabled_present_flag ) {  ph_loop_filter_across_virtual_boundaries_disabled_present_flag u(1)  if( ph_loop_filter_across_virtual_boundaries_disabled_present_flag ) {   ph_num_ver_virtual_boundaries u(2)    for( i = 0; i <ph_num_ver_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_x[ i] u(13)    ph_num_hor_virtual_boundaries u(2)    for( i = 0; i <ph_num_hor_virtual_boundaries; i++ )     ph_virtual_boundaries_pos_y[ i] u(13)   }  }  ...  if( sps_sao_enabled_flag ) {  pic_sao_enabled_present_flag u(1)   if( pic_sao_enabled_present_flag ){    pic_sao_luma_enabled_flag u(1)    if(ChromaArrayType != 0 )    pic_sao_chroma_enabled_flag u(1)   }  }  if( sps_alf_enabled_flag ){   pic_alf_enabled_present_flag u(1)   if( pic_alf_enabled_present_flag) {    pic_alf_enabled_flag u(1)    if( pic_alf_enabled_flag ) {    pic_num_alf_aps_ids_luma u(3)     for( i = 0; i <pic_num_alf_aps_ids_luma; i++ )      pic_alf_aps_id_luma[ i ] u(3)    if( ChromaArrayType != 0 )      pic_alf_chroma_idc u(2)     if(pic_alf_chroma_idc )      pic_alf_aps_id_chroma u(3)    }   }  }  ... if( deblocking_filter_override_enabled_flag ) {  pic_deblocking_filter_override_present_flag u(1)   if(pic_deblocking_filter_override_present_flag ) {   pic_deblocking_filter_override_flag u(1)    if(pic_deblocking_filter_override_flag ) {    pic_deblocking_filter_disabled_flag u(1)     if(!pic_deblocking_filter_disabled_flag ) {      pic_beta_offset_div2 se(v)     pic_tc_offset_div2 se(v)     }    }   }  }  ... }

TABLE 9 ph_loop_filter_across_virtual_boundaries_disabled_present_flagequal to 1 specifies that the in-loop filtering operations are disabledacross the virtual boundaries in pictures associated to the PH.ph_loop_filter_across_virtual_boundaries_disable_(——)present_flag equalto 0 specifies that no such disabling of in-loop filtering operations isapplied in pictures associated to the PH. The in-loop filteringoperations include the deblocking filter, sample adaptive offset filter,and adaptive loop filter operations. ph_num_ver_virtual_boundariesspecifies the number of ph_virtual_boundaries_pos_x[ i ] syntax elementsthat are present in the PH. ph_virtual_boundaries_pos_x[ i ] is used tocompute the value of VirtualBoundariesPosX[ i ], which specifies thelocation of the i-th vertical virtual boundary in units of luma samples.The value of ph_virtual_boundaries_pos_x[ i ] shall be in the range of 1to Ceil( pic_width_in_luma_samples ÷ 8 ) − 1, inclusive.ph_num_hor_virtual_boundaries specifies the number ofph_virtual_boundaries_pos_y[ i ] syntax elements that are present in thePH. ph_virtual_boundaries_pos_y[ i ] is used to compute the value ofVirtualBoundariesPosY[ i ], which specifies the location of the i-thhorizontal virtual boundary in units of luma samples. The value ofph_virtual_boundaries_pos_y[ i ] shall be in the range of 1 to Ceil(pic_height_in_luma_samples ÷ 8 ) − 1, inclusive.pic_sao_enabled_present_flag equal to 1 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are present in the PH.pic_sao_enabled_present_flag equal to 0 specifies that pic_sao_luma_flagand pic_sao_chroma_flag are not present in the PH. Whenpic_sao_enabled_present_flag is not present, it is inferred to be equalto 0. pic_sao_luma_enabled_flag equal to 1 specifies that SAO is enabledfor the luma component in all slices associated with the PH;pic_sao_luma_enabled_flag equal to 0 specifies that SAO for the lumacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_sao_chroma_enabled_flag equal to 1 specifies that SAOis enabled for the chroma component in all slices associated with thePH; pic_sao_chroma_enabled_flag equal to 0 specifies that SAO for chromacomponent may be disabled for one, or more, or all slices associatedwith the PH. pic_alf_enabled_present_flag equal to 1 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are present in the PH.pic_alf_enabled_present_flag equal to 0 specifies thatpic_alf_enabled_flag, pic_num_alf_aps_ids_luma, pic_alf_aps_id_luma[ i], pic_alf_chroma_idc, and pic_alf_aps_id_chroma are not present in thePH. When pic_alf_enabled_present_flag is not present, it is inferred tobe equal to 0. pic_alf_enabled_flag equal to 1 specifies that adaptiveloop filter is enabled for all slices associated with the PH and may beapplied to Y, Cb, or Cr colour component in the slices.pic_alf_enabled_flag equal to 0 specifies that adaptive loop filter maybe disabled for one, or more, or all slices associated with the PH. Whennot present, pic_alf_enabled_flag is inferred to be equal to 0.pic_num_alf_aps_ids_luma specifies the number of ALF APSs that theslices associated with the PH refers to. pic_alf_aps_id_luma[ i ]specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slices associated with the PH refers to. The valueof alf_luma_filter_signal_flag of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto pic_alf_aps_id_luma[ i ] shall be equal to 1. pic_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. pic_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.pic_alf_chroma_idc equal to 2 indicates that the adaptive loop filter isapplied to the Cr colour component. pic_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When pic_alf_chroma_idc is not present, it is inferred to beequal to 0. pic_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slices associated with the PH refers to.pic_deblocking_filter_override_present_flag equal to 1 specifics thatpic_deblocking_filter_override_flag is present in the PH.pic_deblocking_filter_override_present_flag equal to 0 specifies thatpic_deblocking_filter_override_flag is not present in the PH. Whenpic_deblocking_filter_override_present_flag is not present, it isinferred to be equal to 0. pic_deblocking_filter_override_flag equal to1 specifies that deblocking parameters are present in the PH.pic_deblocking_filter_override_flag equal to 0 specifies that deblockingparameters are not present in the PH. When not present, the value ofpic_pic_deblocking_filter_override_flag is inferred to be equal to 0.pic_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the slicesassociated with the PH. pic_deblocking_filter_disabled_flag equal to 0specifies that the operation of the deblocking filter is applied for theslices associated with the PH. When pic_deblocking_filter_disabled_flagis not present, it is inferred to be equal topps_deblocking_filter_disabled_flag. pic_beta_offset_div2 andpic_tc_offset_div2 specify the deblocking parameter offsets for β and tC(divided by 2) for the slices associated with the PH. The values ofpic_beta_offset_div2 and pic_tc_offset_div2 shall both be in the rangeof −6 to 6, inclusive. When not present, the values ofpic_beta_offset_div2 and pic_tc_offset_div2 are inferred to be equal topps_beta_offset_div2 and pps_tc_offset_div2, respectively.

The following tables represent exemplary syntax and semantics of a sliceheader according to the present embodiment.

TABLE 10 Descriptor slice_header( ) {  ...  if(pps_cu_chroma_qp_offset_list_enabled_flag )  cu_chroma_qp_offset_enabled_flag u(1)  if( sps_sao_enabled_flag &&!pic_sao_enabled_present_flag ) {   slice_sao_luma_flag u(1)   if(ChromaArrayType != 0 )    slice_sao_chroma_flag u(1)  }  if(sps_alf_enabled_flag && !pic_alf_enabled_present_flag ) {  slice_alf_enabled_flag u(1)   if( slice_alf_enabled_flag ) {   slice_num_alf_aps_ids_luma u(3)    for( i = 0; i <slice_num_alf_aps_ids_luma; i++ )     slice_alf_aps_id_luma[ i ] u(3)   if( ChromaArrayType != 0 )     slice_alf_chroma_idc u(2)    if(slice_alf_chroma_idc )     slice_alf_aps_id_chroma u(3)   }  }  if(deblocking_filter_override_enabled_flag &&     !pic_deblocking_filter_override_present_flag )  slice_deblocking_filter_override_flag u(1)  if(slice_deblocking_filter_override_flag ) {  slice_deblocking_filter_disabled_flag u(1)   if(!slice_deblocking_filter_disabled_flag ) {   slice_beta_offset_div2se(v)   slice_tc_offset_div2 se(v)   }  }  ... }

TABLE 11 cu_chroma_qp_offset_enabled_flag equal to 1 specifies that thecu_chroma_qp_offset_flag may be present in the transform unit andpalette coding syntax. cu_chroma_qp_offset_enabled_flag equal to 0specifies that the cu_chroma_qp_offset_flag is not present in thetransform unit or palette coding syntax. When not present, the value ofcu_chroma_qp_offset_enabled_flag is inferred to be equal to 0.slice_sao_luma_flag equal to 1 specifies that SAO is enabled for theluma component in the current slice; slice_sao_luma_flag equal to 0specifies that SAO is disabled for the luma component in the currentslice. When slice_sao_luma_flag is not present, it is inferred to beequal to pic_sao_luma_enabled_flag. slice_sao_chroma_flag equal to 1specifies that SAO is enabled for the chroma component in the currentslice; slice_sao_chroma_flag equal to 0 specifies that SAO is disabledfor the chroma component in the current slice. Whenslice_sao_chroma_flag is not present, it is inferred to be equal topic_sao_chroma_enabled_flag. slice_alf_enabled_flag equal to 1 specifiesthat adaptive loop filter is enabled and may be applied to Y, Cb, or Crcolour component in a slice. slice_alf_enabled_flag equal to 0 specifiesthat adaptive loop filter is disabled for all colour components in aslice. When not present, the value of slice_alf_enabled_flag is inferredto be equal to pic_alf_enabled_flag. slice_num_alf_aps_ids_lumaspecifies the number of ALF APSs that the slice refers to. Whenslice_alf_enabled_flag is equal to 1 and slice_num_alf_aps_ids_luma isnot present, the value of slice_num_alf_aps_ids_luma is interred to beequal to the value of pic_num_alf_aps_ids_luma. slice_alf_aps_id_luma[ i] specifies the adaptation_parameter_set_id of the i-th ALF APS that theluma component of the slice refers to. The TemporalId of the APS NALunit having aps_params_type equal to ALF_APS andadaptation_parameter_set_id equal to slice_alf_aps_id_luma[ i ] shall beless than or equal to the TemporalId of the coded slice NAL unit. Whenslice_alf_enabled_flag is equal to 1 and slice_alf_aps_id_luma[ i ] isnot present, the value of slice_alf_aps_id_luma[ i ] is inferred to beequal to the value of pic_alf_aps_id_luma[ i ]. The value ofalf_luma_filter_signal_flag of the APS NAL unit having aps_params_typeequal to ALF_APS and adaptation_parameter_set_id equal toslice_alf_aps_id_luma[ i ] shall be equal to 1. slice_alf_chroma_idcequal to 0 specifies that the adaptive loop filter is not applied to Cband Cr colour components. slice_alf_chroma_idc equal to 1 indicates thatthe adaptive loop filter is applied to the Cb colour component.slice_alf_chroma_idc equal to 2 indicates that the adaptive loop filteris applied to the Cr colour component. slice_alf_chroma_idc equal to 3indicates that the adaptive loop filter is applied to Cb and Cr colourcomponents. When slice_alf_chroma_idc is not present, it is inferred tobe equal to pic_alf_chroma_idc. slice_alf_aps_id_chroma specifies theadaptation_parameter_set_id of the ALF APS that the chroma component ofthe slice refers to. The TemporalId of the APS NAL unit havingaps_params_type equal to ALF_APS and adaptation_parameter_set_id equalto slice_alf_aps_id_chroma shall be less than or equal to the TemporalIdof the coded slice NAL unit. When slice_alf_enabled_flag is equal to 1and slice_alf_aps_id_chroma is not present, the value ofslice_alf_aps_id_chroma is inferred to be equal to the value ofpic_alf_aps_id_chroma. The value of alf_chroma_filter_signal_flag of theAPS NAL unit having aps_params_type equal to ALF_APS andadaptation_parameter_set_id equal to slice_alf_aps_id_chroma shall beequal to 1. slice_deblocking_filter_override_flag equal to 1 specifiesthat deblocking parameters are present in the slice header.slice_deblocking_filter_override_flag equal to 0 specifies thatdeblocking parameters are not present in the slice header. When notpresent, the value of slice_deblocking_filter_override_flag is inferredto be equal to pic_deblocking_filter_override_flag.slice_deblocking_filter_disabled_flag equal to 1 specifies that theoperation of the deblocking filter is not applied for the current slice.slice_deblocking_filter_disabled_flag equal to 0 specifies that theoperation of the deblocking filter is applied for the current slice.When slice_deblocking_filter_disabled_flag is not present, it isinterred to be equal to pic_deblocking_filter_disabled_flag.slice_beta_offset_div2 and slice_tc_offset_div2 specify the deblockingparameter offsets for β and tC (divided by 2) for the current slice. Thevalues of slice_beta_offset div2 and slice_tc_offset_div2 shall both bein the range of −6 to 6, inclusive. When not present, the values ofslice_beta_offset_div2 and slice_tc_offset_div2 are inferred to be equalto pic_beta_offset_div2 and pic_tc_offset_div2, respectively.

Hereinafter, information related to subpictures, information related tovirtual boundaries that can be used for in-loop filtering, and theirsignaling will be described.

In an example, two different rectangular slices may belong to differentsubpictures while sharing the same tile. In this case, a problem mayarise, in which coding complexity is increased.

In order to simplify the picture division, an embodiment of the presentdocument may include condition examples for a picture being divided intotwo or more subpictures. In an example, all CTUs in one tile may belongto the same subpictures. In another example, all CTUs in a subpicturemay belong to the same tile. The above two examples may be appliedindividually for image/video coding, may be applied sequentially, or maybe applied in combination. Further, in an embodiment of the presentdocument, in case that a subpicture includes CTUs being subsets of allCTUs in one tile, the subpicture may not include the CTUs belonging toanother tile.

In the signaling for the current picture, if the value ofsubpic_present_flag is 1, the number of subpictures in each picturereferring to the SPS may be 1 (the value of sps_num_subpics_minus1 is0). Such a condition has been made to support a subpicture extractionusage example in which a subpicture independently coded from thebitstream in order to form another bitstream even without changingvalues smaller than the values of parameter sets. Accordingly, even ifthe value of subpic_present_flag is 1, and the value ofsps_num_subpics_minus1 is 0, subpic_ctu_top_left_x[0],subpic_ctu_top_left_y[0], subpic_width_minus1[0],subpic_height_minus1[0], subpic_treated_aspic_flag[i], and/or loopfilter across subpic_enabled_flag[i] are still present. In such asituation, such syntax elements may be present to overlap each other,and if a signal for a wrong value is received in the correspondingsyntax element, it may make the operation of the decoder unpredictableas well. For example, if the value of subpics_present_flag is 1, and thevalue of sps_num_subpics_minus1 is 0, this means that only onesubpicture (picture itself) is present, and the value ofsubpic_treat_aspic_flag[0] is equal to 1. In this case, if thecorresponding value is signaled as the value of 0, a contradictoryproblem may occur in the decoding process.

In order to solve the above-described problem, an embodiment of thepresent document includes condition examples capable of being applied incase that subpicture signaling is present (e.g., the value ofsubpic_present_flag is 1), and only one subpicture is present in thepicture (e.g., the value of sps_num_subpics_minus1 is 0). The abovecondition examples may be as in the following table.

TABLE 12 a) There signalling of the property of the only subpicture inthe picture is omitted and their values are derived. In other word,syntax elements subpic_ctu_top_left_x[ 0 ], subpic_ctu_top_left_y[ 0 ],subpic_width_minus1[ 0 ], subpic_height_minus1[ 0 ],subpic_treated_as_pic_flag[ 1 ], andloop_filter_across_subpic_enabled_flag[ i ] in the current VVC spec isnot present and their values are inferred as follows:  -subpic_ctu_top_left_x[ 0 ] is inferred to be equal to 0  -subpic_ctu_top_left_y[ 0 ] is inferred to be equal to 0  -subpic_width_minus1[ 0 ] is inferred to be equal to Ceil(pic_width_max_in_luma_samples ÷ CtbSizeY ) )  - subpic_height_minus1[ 0] is inferred to be equal to Ceil( pic_height_max_in_luma_samples ÷CtbSizeY ) )  - subpic_treated_as_pic_flag[ 0 ] is inferred to be equalto 1  - loop_filler_across_subpic_enabled_flag[ 0 ] is inferred to beequal to 0 b) The values of the subpicture's properties are constrainedas follow:  - The first CTU of the subpicture is the first CTU of thepicture (i.e., subpic_ctu_top_left_x[ 0 ] is constrained to be equal to0, subpic_ctu_top_left_y[ 0 ] is constrained to be equal to 0)  - Thewidth of the subpicture is the width of the picture (i.e.,subpic_width_minus1[ 0 ] is constrained to be equal to Ceil(pic_width_max_in_luma_samples ÷ CtbSizeY ) )).  - The height of thesubpicture is the height of the picture (i.e., subpic_height_minus1[ 0 ]is constrained to be equal to Ceil( pic_height_max_in_luma_samples ÷CtbSizeY ) )).  - The subpicture is an independently coded subpicture(i.e., subpic_treated_as_pic_flag[ 0 ] is constrained to be equal to 1).

In an example, in case that the subpicture signaling is present, andpositions of virtual boundaries are present in a picture header, thereis a problem in that the picture header should be rewritten in order toidentify whether signaling of the virtual boundary position is correctin subpicture extraction and subpicture merge scenarios. This mayviolate the design purpose of the subpicture extraction/merge, in whichthe bitstream is not necessary to be rewritten for the NAL unit of thelayer that is lower than that of the parameter sets.

In order to solve the above problem, according to an embodiment of thepresent document, if the subpicture signaling is present (e.g., if thesubpicture signaling is present in the SPS), signaling of virtualboundary positions may not be included in the picture header. As anexample, if the subpicture signaling is present, information about thepositions of the virtual boundaries may be included in a high-levelparameter set. For example, if the subpicture signaling is present, theinformation about the positions of the virtual boundaries may beincluded in the SPS. Further, if the subpicture signaling is present,the information about the positions of the virtual boundaries may beincluded in the PPS.

In an embodiment of the present document, if the subpicture ID signalingis present (if the value of sps_subpic_id_present_flag is 1, allsubpictures may be independently coded subpictures (the value ofsubpic_treated_aspic_flag[i] is 1). In this case, the positions (e.g.,SPS, PPS, or picture header) of the subpicture ID signaling may have norelation.

According to embodiments of the present document together with the abovetables, it may be determined whether virtual boundary relatedinformation (e.g., virtual boundary position related information) issignaled in the sequence parameter set based on whether the subpictureinformation is present. For example, in case that the subpictureinformation is present in the corresponding sequence, the virtualboundary related information (e.g., virtual boundary position relatedinformation) may be signaled in the sequence parameter set. Accordingly,the virtual boundary based coding method according to embodiments of thepresent document may be efficiently performed without rewriting orchanging the high-level syntax.

Further, according to embodiments of the present document, a (decoded)picture may be composed of subpictures. The information about thesubpictures may be obtained by the decoding apparatus, and based on theinformation about the subpictures, the decoding process may beperformed. In an example, based on the information about thesubpictures, the decoding apparatus may determine the position (e.g.,SPS) where the information about the positions of the virtual boundariesfor the in-loop filtering is signaled.

FIG. 10 and FIG. 11 schematically show an example of a video/imageencoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 10 may be performed by an encodingapparatus disclosed in FIG. 2 or FIG. 11 . Specifically, for example,S1000 to S1020 of FIG. 10 may be performed by the residual processor 230of the encoding apparatus of FIG. 11 , S1040 of FIG. 10 may be performedby the filter 260 of the encoding apparatus of FIG. 11 , and S1050 ofFIG. 10 may be performed by the entropy encoder 240 of the encodingapparatus of FIG. 11 . Further, although not illustrated in FIG. 10 ,prediction samples or prediction related information may be derived bythe predictor 220 of the encoding apparatus, and the bitstream may begenerated from residual information or prediction related information bythe entropy encoder 240 of the encoding apparatus. The method disclosedin FIG. 10 may include the above-described embodiments of the presentdocument.

The encoding apparatus may derive subpictures. The encoding apparatusmay divide the current picture into subpictures. The encoding apparatusmay determine the size (e.g., height/width) of the subpictures. Further,the encoding apparatus may determine the number of subpicture(s)included in the current picture.

The encoding apparatus may generate subpicture related information. Forexample, the encoding apparatus may generate the subpicture relatedinformation based on the number of subpicture(s) included in the currentpicture, the size (e.g., height/width) of the subpictures, and/orboundaries of the subpictures. The subpicture related information mayinclude information about whether the subpicture is present, informationabout whether the subpicture is handled as the picture, informationabout the number of subpicture(s) included in the current picture,information about the size (e.g., height/width) of the subpictures,information about whether the boundaries of the subpictures coincidewith the boundary of the current picture, and/or information about IDsof the subpictures.

Referring to FIG. 10 , the encoding apparatus may derive residualsamples (S1000). The encoding apparatus may derive the residual samplesfor the current block, and the residual samples of the current block maybe derived based on the original samples and prediction samples of thecurrent block. Specifically, the encoding apparatus may derive theprediction samples of the current block based on the prediction mode. Inthis case, various prediction methods, such as inter prediction or intraprediction, disclosed in the present document may be applied. Residualsamples may be derived based on the prediction samples and the originalsamples.

The encoding apparatus may derive transform coefficients (S1010). Theencoding apparatus may derive the transform coefficients based on atransform process for the residual samples. For example, the transformprocess may include at least one of DCT, DST, GBT, or CNT.

The encoding apparatus may derive quantized transform coefficients(S1020). The encoding apparatus may derive the quantized transformcoefficients based on a quantization process for the transformcoefficients. The quantized transform coefficients may have aone-dimensional vector form based on a coefficient scan order.

The encoding apparatus may generate residual information (S1030). Theencoding apparatus may generate the residual information based on theresidual samples for the current block. The encoding apparatus maygenerate the residual information representing the quantized transformcoefficients. The residual information may be generated through variousencoding methods, such as exponential Golomb, CAVLC, and CABAC.

The encoding apparatus may generate reconstructed samples. The encodingapparatus may generate the reconstructed samples based on the residualinformation. The reconstructed samples may be generated by addingresidual samples based on the residual information to the predictionsample. Specifically, the encoding apparatus may perform prediction(intra or inter prediction) for the current block, and may generate thereconstructed samples based on the prediction samples generated throughprediction with the original samples.

The reconstructed samples may include reconstructed luma samples andreconstructed chroma samples. Specifically, the residual samples mayinclude residual luma samples and residual chroma samples. The residualluma samples may be generated based on the original luma samples andprediction luma samples. The residual chroma samples may be generatedbased on the original chroma samples and prediction chroma samples. Theencoding apparatus may derive transform coefficients (luma transformcoefficients) for the residual luma samples and/or transformcoefficients (chroma transform coefficients) for the residual chromasamples. Quantized transform coefficients may include quantized lumatransform coefficients and/or quantized chroma transform coefficients.

The encoding apparatus may determine whether the in-loop filteringprocess is performed across the virtual boundaries (S1040). Based on theabove determination, the encoding apparatus may generate informationabout the number of virtual boundaries and the positions of the virtualboundaries. For example, the encoding apparatus may generate informationabout the number of virtual boundaries and the positions of the virtualboundaries. For example, the encoding apparatus may generate informationabout the number of vertical virtual boundaries, information about thepositions of the vertical virtual boundaries, information about thenumber of horizontal virtual boundaries, and information about thepositions of the horizontal virtual boundaries.

The encoding apparatus may generate in-loop filtering relatedinformation for reconstructed samples of the current picture. Theencoding apparatus may perform the in-loop filtering process for thereconstructed samples, and may generate the in-loop filtering relatedinformation based on the in-loop filtering process. For example, thein-loop filtering related information may include information about thevirtual boundaries as described above in the present document (SPSvirtual boundary enabled flag, picture header virtual boundary enabledflag, SPS virtual boundary present flag, picture header virtual boundarypresent flag, and information about the positions of the virtualboundaries). In an example, the encoding apparatus may generate thein-loop filtering related information based on the information about thenumber of vertical virtual boundaries, the information about thepositions of the vertical virtual boundaries, the information about thenumber of horizontal virtual boundaries, and the information about thepositions of the horizontal virtual boundaries.

The encoding apparatus may encode video/image information (S1050). Theimage information may include the residual information, the predictionrelated information, the subpicture related information, and/or thein-loop filtering related information. The encoded video/imageinformation may be output in the form of a bitstream. The bitstream maybe transmitted to the decoding apparatus through a network or a storagemedium.

The image/video information may include various pieces of informationaccording to an embodiment of the present document. For example, theimage/video information may include information disclosed in at leastone of the above-described tables 1 to 12.

In an embodiment, the image information may include a sequence parameterset (SPS). Based on whether the SPS includes the subpicture relatedinformation, it may be determined whether the SPS includes additionalinformation related to the virtual boundaries.

In an embodiment, the additional information related to the virtualboundaries may include the number of the virtual boundaries andpositions of the virtual boundaries.

In an embodiment, the additional information related to the virtualboundaries may include information on the number of vertical virtualboundaries, information on positions of the vertical virtual boundaries,information on the number of horizontal virtual boundaries, andinformation on positions of the horizontal virtual boundaries.

In an embodiment, the image information may include a subpicture presentflag (e.g., subpic_present_flag). It may be determined whether the SPSincludes the subpicture-related information based on the subpicturepresent flag.

In an embodiment, the image information may include a subpicture IDpresent flag. Subpictures in the current picture may be independentlycoded subpictures based on that the value of the subpicture ID presentflag is 1.

In an embodiment, the current picture may include subpictures and tiles.Coding tree units (CTUs) in one tile may belong to the same subpicture.

In an embodiment, the current picture may include subpictures and tiles.Coding tree units (CTUs) in one subpicture may belong to the same tile.

In an embodiment, the SPS may include an SPS virtual boundary presentflag related to whether the SPS includes the additional informationrelated to the virtual boundaries. The value of the SPS virtual boundarypresent flag may be determined as 1 based on that the SPS includes thesubpicture-related information.

In an embodiment, the image information may include picture headerinformation. The additional information related to the virtualboundaries may not be included in the picture header based on that theSPS includes the subpicture-related information.

In an embodiment, the SPS may include the additional information relatedto the virtual boundaries based on that the SPS includes thesubpicture-related information.

FIG. 12 and FIG. 13 schematically show an example of a video/imagedecoding method and related components according to embodiment(s) of thepresent document.

The method disclosed in FIG. 12 may be performed by a decoding apparatusdisclosed in FIG. 12 or FIG. 13 . Specifically, for example, S1200 ofFIG. 12 may be performed by the entropy decoder 310 of the decodingapparatus, S1210 to S1230 of FIG. 12 may be performed by the residualprocessor 320 of the decoding apparatus, S1240 may be performed by theresidual processor 320 and/or the adder 340 of the decoding apparatus,and S1250 may be performed by the filter 350 of the decoding apparatus.The method disclosed in FIG. 12 may include the above-describedembodiments as described above in the present document.

Referring to FIG. 12 , the decoding apparatus may receive/obtainvideo/image information (S1200). The video/image information may includeresidual information, prediction related information, subpicture relatedinformation, and/or in-loop filtering related information. The decodingapparatus may receive/obtain the image/video information through abitstream.

The image/video information may include various pieces of informationaccording to an embodiment of the present document. For example, theimage/video information may include information disclosed in at leastone of the above-described tables 1 to 12.

The decoding apparatus may derive subpicture(s) for the current picture.The decoding apparatus may derive the subpicture(s) based on thesubpicture related information obtained based on the bitstream. Based onthe subpicture related information, the number of subpicture(s), thesize of the subpicture(s), and whether the subpicture(s) are handled asthe picture. Residual samples and/or prediction samples to be describedlater may be generated based on the subpicture(s).

The decoding apparatus may derive quantized transform coefficients(S1210). The decoding apparatus may derive the quantized transformcoefficients based on the residual information. The quantized transformcoefficients may have a one-dimensional vector form based on acoefficient scan order. The quantized transform coefficients may includequantized luma transform coefficients and/or quantized chroma transformcoefficients.

The decoding apparatus may derive transform coefficients (S1220). Thedecoding apparatus may derive the transform coefficients based on adequantization process for the quantized transform coefficients. Thedecoding apparatus may derive luma transform coefficients through thedequantization based on the quantized luma transform coefficients. Thedecoding apparatus may derive chroma transform coefficients through thedequantization based on the quantized chroma transform coefficients.

The decoding apparatus may generate/derive residual samples (S1230). Thedecoding apparatus may derive the residual samples based on an inversetransform process for the transform coefficients. The decoding apparatusmay derive residual luma samples through the inverse transform processbased on the luma transform coefficients. The decoding apparatus mayderive residual chroma samples through the inverse transform processbased on the chroma transform coefficients.

The decoding apparatus may generate/derive reconstructed samples(S1240). For example, the decoding apparatus may generate/derivereconstructed luma samples and/or reconstructed chroma samples. Thedecoding apparatus may generate/derive the reconstructed luma samplesand/or the reconstructed chroma samples based on the residualinformation. The decoding apparatus may generate the reconstructedsamples based on the residual information. The reconstructed samples mayinclude the reconstructed luma samples and/or the reconstructed chromasamples. Luma components of the reconstructed sample may correspond tothe reconstructed luma samples, and chroma components of thereconstructed samples may correspond to the reconstructed chromasamples. The decoding apparatus may generate prediction luma samplesand/or prediction chroma samples through a prediction process. Thedecoding apparatus may generate reconstructed luma samples based on theprediction luma samples and the residual luma samples. The decodingapparatus may generate reconstructed chroma samples based on theprediction chroma samples and the residual chroma samples. In addition,the decoding apparatus may generate reconstructed samples of the currentpicture based on the residual samples, prediction samples, and/orsubpicture(s).

The decoding apparatus may generate modified (filtered) reconstructedsamples (S1250). The decoding apparatus may generate the modifiedreconstructed samples based on the in-loop filtering process for thereconstructed samples. The decoding apparatus may generate the modifiedreconstructed samples based on the in-loop filtering relatedinformation. In order to generate the modified reconstructed samples,the decoding apparatus may use a deblocking process, SAO process, and/orALF process.

In an embodiment, the image information may include a sequence parameterset (SPS). Based on whether the SPS includes the subpicture relatedinformation, it may be determined whether the SPS includes additionalinformation related to the virtual boundaries.

In an embodiment, the additional information related to the virtualboundaries may include the number of the virtual boundaries andpositions of the virtual boundaries.

In an embodiment, the additional information related to the virtualboundaries may include information on the number of vertical virtualboundaries, information on positions of the vertical virtual boundaries,information on the number of horizontal virtual boundaries, andinformation on positions of the horizontal virtual boundaries.

In an embodiment, the image information may include a subpicture presentflag (e.g., subpic_present_flag). It may be determined whether the SPSincludes the subpicture-related information based on the subpicturepresent flag.

In an embodiment, the image information may include a subpicture IDpresent flag. Subpictures in the current picture may be independentlycoded subpictures based on that the value of the subpicture ID presentflag is 1.

In an embodiment, the current picture may include subpictures and tiles.Coding tree units (CTUs) in one tile may belong to the same subpicture.

In an embodiment, the current picture may include subpictures and tiles.Coding tree units (CTUs) in one subpicture may belong to the same tile.

In an embodiment, the SPS may include an SPS virtual boundary presentflag related to whether the SPS includes the additional informationrelated to the virtual boundaries. The value of the SPS virtual boundarypresent flag may be determined as 1 based on that the SPS includes thesubpicture-related information.

In an embodiment, the image information may include picture headerinformation. The additional information related to the virtualboundaries may not be included in the picture header based on that theSPS includes the subpicture-related information.

In an embodiment, the SPS may include the additional information relatedto the virtual boundaries based on that the SPS includes thesubpicture-related information.

If residual samples for the current block are present, the decodingapparatus may receive information about the residual for the currentblock. The information about the residual may include transformcoefficients for the residual samples. The decoding apparatus may derivethe residual samples (or residual sample array) for the current blockbased on the residual information. Specifically, the decoding apparatusmay derive quantized transform coefficients based on the residualinformation. The quantized transform coefficients may haveone-dimensional vector form based on a coefficient scan order. Thedecoding apparatus may derive transform coefficients based on adequantization process for the quantized transform coefficients. Thedecoding apparatus may derive residual samples based on the transformcoefficients.

The decoding apparatus may generate reconstructed samples based on(intra) prediction samples and residual samples, and may derive areconstructed block or a reconstructed picture based on thereconstructed samples. Specifically, the decoding apparatus may generatethe reconstructed samples based on a sum between the (intra) predictionsamples and the residual samples. Thereafter, as described above, thedecoding apparatus, as needed, may apply the in-loop filtering process,such as the deblocking filtering and/or SAO processes, to thereconstructed picture in order to improve the subjective/objectivepicture quality.

For example, the decoding apparatus may obtain image informationincluding all or parts of the above-described pieces of information (orsyntax elements) by decoding the bitstream or the encoded information.Further, the bitstream or the encoded information may be stored in acomputer readable storage medium, and may cause the above-describeddecoding method to be performed.

Although methods have been described on the basis of a flowchart inwhich steps or blocks are listed in sequence in the above-describedembodiments, the steps of the present document are not limited to acertain order, and a certain step may be performed in a different stepor in a different order or concurrently with respect to that describedabove. Further, it will be understood by those ordinary skilled in theart that the steps of the flowcharts are not exclusive, and another stepmay be included therein or one or more steps in the flowchart may bedeleted without exerting an influence on the scope of the presentdocument.

The aforementioned method according to the present document may be inthe form of software, and the encoding apparatus and/or decodingapparatus according to the present document may be included in a devicefor performing image processing, for example, a TV, a computer, a smartphone, a set-top box, a display device, or the like.

When the embodiments of the present document are implemented bysoftware, the aforementioned method may be implemented by a module(process or function) which performs the aforementioned function. Themodule may be stored in a memory and executed by a processor. The memorymay be installed inside or outside the processor and may be connected tothe processor via various well-known means. The processor may includeApplication-Specific Integrated Circuit (ASIC), other chipsets, alogical circuit, and/or a data processing device. The memory may includea Read-Only Memory (ROM), a Random Access Memory (RAM), a flash memory,a memory card, a storage medium, and/or other storage device. In otherwords, the embodiments according to the present document may beimplemented and executed on a processor, a micro-processor, acontroller, or a chip. For example, functional units illustrated in therespective figures may be implemented and executed on a computer, aprocessor, a microprocessor, a controller, or a chip. In this case,information on implementation (for example, information on instructions)or algorithms may be stored in a digital storage medium.

In addition, the decoding apparatus and the encoding apparatus to whichthe embodiment(s) of the present document is applied may be included ina multimedia broadcasting transceiver, a mobile communication terminal,a home cinema video device, a digital cinema video device, asurveillance camera, a video chat device, and a real time communicationdevice such as video communication, a mobile streaming device, a storagemedium, a camcorder, a video on demand (VoD) service provider, an OverThe Top (OTT) video device, an internet streaming service provider, a 3Dvideo device, a Virtual Reality (VR) device, an Augment Reality (AR)device, an image telephone video device, a vehicle terminal (forexample, a vehicle (including an autonomous vehicle) terminal, anairplane terminal, or a ship terminal), and a medical video device; andmay be used to process an image signal or data. For example, the OTTvideo device may include a game console, a Blu-ray player, anInternet-connected TV, a home theater system, a smartphone, a tablet PC,and a Digital Video Recorder (DVR).

In addition, the processing method to which the embodiment(s) of thepresent document is applied may be produced in the form of a programexecuted by a computer and may be stored in a computer-readablerecording medium. Multimedia data having a data structure according tothe embodiment(s) of the present document may also be stored in thecomputer-readable recording medium. The computer readable recordingmedium includes all kinds of storage devices and distributed storagedevices in which computer readable data is stored. The computer-readablerecording medium may include, for example, a Blu-ray disc (BD), auniversal serial bus (USB), a ROM, a PROM, an EPROM, an EEPROM, a RAM, aCD-ROM, a magnetic tape, a floppy disk, and an optical data storagedevice. The computer-readable recording medium also includes mediaembodied in the form of a carrier wave (for example, transmission overthe Internet). In addition, a bitstream generated by the encoding methodmay be stored in the computer-readable recording medium or transmittedthrough a wired or wireless communication network.

In addition, the embodiment(s) of the present document may be embodiedas a computer program product based on a program code, and the programcode may be executed on a computer according to the embodiment(s) of thepresent document. The program code may be stored on a computer-readablecarrier.

FIG. 14 represents an example of a contents streaming system to whichthe embodiment of the present document may be applied.

Referring to FIG. 14 , the content streaming system to which theembodiments of the present document is applied may generally include anencoding server, a streaming server, a web server, a media storage, auser device, and a multimedia input device.

The encoding server functions to compress to digital data the contentsinput from the multimedia input devices, such as the smart phone, thecamera, the camcorder and the like, to generate a bitstream, and totransmit it to the streaming server. As another example, in a case wherethe multimedia input device, such as, the smart phone, the camera, thecamcorder or the like, directly generates a bitstream, the encodingserver may be omitted.

The bitstream may be generated by an encoding method or a bitstreamgeneration method to which the embodiments of the present document isapplied. And the streaming server may temporarily store the bitstream ina process of transmitting or receiving the bitstream.

The streaming server transmits multimedia data to the user equipment onthe basis of a user's request through the web server, which functions asan instrument that informs a user of what service there is. When theuser requests a service which the user wants, the web server transfersthe request to the streaming server, and the streaming server transmitsmultimedia data to the user. In this regard, the contents streamingsystem may include a separate control server, and in this case, thecontrol server functions to control commands/responses betweenrespective equipment in the content streaming system.

The streaming server may receive contents from the media storage and/orthe encoding server. For example, in a case the contents are receivedfrom the encoding server, the contents may be received in real time. Inthis case, the streaming server may store the bitstream for apredetermined period of time to provide the streaming service smoothly.

For example, the user equipment may include a mobile phone, a smartphone, a laptop computer, a digital broadcasting terminal, a personaldigital assistant (PDA), a portable multimedia player (PMP), anavigation, a slate PC, a tablet PC, an ultrabook, a wearable device(e.g., a watch-type terminal (smart watch), a glass-type terminal (smartglass), a head mounted display (HMD)), a digital TV, a desktop computer,a digital signage or the like.

Each of servers in the contents streaming system may be operated as adistributed server, and in this case, data received by each server maybe processed in distributed manner.

Claims in the present description can be combined in a various way. Forexample, technical features in method claims of the present descriptioncan be combined to be implemented or performed in an apparatus, andtechnical features in apparatus claims can be combined to be implementedor performed in a method. Further, technical features in method claim(s)and apparatus claim(s) can be combined to be implemented or performed inan apparatus. Further, technical features in method claim(s) andapparatus claim(s) can be combined to be implemented or performed in amethod.

1. An image decoding method performed by a decoding apparatus, themethod comprising: obtaining image information including residualinformation through a bitstream; deriving quantized transformcoefficients based on the residual information; deriving transformcoefficients based on a dequantization process for the quantizedtransform coefficients; deriving residual samples based on an inversetransform process for the transform coefficients; generatingreconstructed samples of a current picture based on the residualsamples; and generating modified reconstructed samples based on anin-loop filtering process for the reconstructed samples of the currentpicture, wherein it is determined whether the in-loop filtering processis performed across virtual boundaries, wherein the image informationincludes a sequence parameter set (SPS), and wherein whether the SPSincludes information on a number of the virtual boundaries is determinedbased on whether the SPS includes subpicture-related information. 2.(canceled)
 3. The image decoding method of claim 1, wherein theinformation on the number of the virtual boundaries comprisesinformation on a number of vertical virtual boundaries and informationon a number of horizontal virtual boundaries.
 4. The image decodingmethod of claim 1, wherein the image information comprises a subpicturepresent flag, and wherein whether the SPS includes thesubpicture-related information is determined based on the subpicturepresent flag.
 5. The image decoding method of claim 1, wherein thecurrent picture comprises subpictures and tiles, and wherein coding treeunits (CTUs) in one tile belong to the same subpicture.
 6. The imagedecoding method of claim 1, wherein the current picture comprisessubpictures and tiles, and wherein coding tree units (CTUs) in onesubpicture belong to the same tile.
 7. The image decoding method ofclaim 1, wherein the SPS comprises an SPS virtual boundary present flagrelated to whether the SPS includes the information on the number of thevirtual boundaries, and wherein a value of the SPS virtual boundarypresent flag is determined as 1 based on that the SPS includes thesubpicture-related information.
 8. The image decoding method of claim 1,wherein the image information comprises picture header information, andwherein the information on the number of the virtual boundaries is notincluded in the picture header based on that the SPS includes thesubpicture-related information.
 9. The image decoding method of claim 8,wherein the SPS comprises the information on the number of the virtualboundaries based on that the SPS includes the subpicture-relatedinformation.
 10. An image encoding method performed by an encodingapparatus, the method comprising: deriving residual samples for acurrent block; deriving transform coefficients based on a transformprocess for the residual samples; deriving quantized transformcoefficients based on a quantization process for the transformcoefficients; generating residual information based on the quantizedtransform coefficients; determining whether an in-loop filtering processis performed for reconstructed samples of a current picture acrossvirtual boundaries; and encoding image information based on the residualinformation and the determination, wherein the image informationincludes a sequence parameter set (SPS), and wherein whether the SPSincludes information on a number of the virtual boundaries is determinedbased on whether the SPS includes subpicture-related information. 11.(canceled)
 12. The image encoding method of claim 10, wherein theinformation on the number of the virtual boundaries comprisesinformation on a number of vertical virtual boundaries and informationon a number of horizontal virtual boundaries.
 13. The image encodingmethod of claim 10, wherein the image information comprises a subpicturepresent flag, and wherein whether the SPS includes thesubpicture-related information is determined based on the subpicturepresent flag.
 14. The image encoding method of claim 10, wherein theimage information comprises a subpicture ID present flag, and whereinsubpictures in the current picture are independently coded based on thata value of the subpicture ID present flag is
 1. 15. The image encodingmethod of claim 10, wherein the current picture comprises subpicturesand tiles, and wherein coding tree units (CTUs) in one tile belong tothe same subpicture.
 16. The image encoding method of claim 10, whereinthe current picture comprises subpictures and tiles, and wherein codingtree units (CTUs) in one subpicture belong to the same tile.
 17. Theimage encoding method of claim 10, wherein the SPS comprises an SPSvirtual boundary present flag related to whether the SPS includes theinformation on the number of the virtual boundaries, and wherein a valueof the SPS virtual boundary present flag is determined as 1 based onthat the SPS includes the subpicture-related information.
 18. The imageencoding method of claim 10, wherein the image information comprisespicture header information, and wherein the information on the number ofthe virtual boundaries is not included in the picture header based onthat the SPS includes the subpicture-related information.
 19. The imageencoding method of claim 18, wherein the SPS comprises the informationon the number of the virtual boundaries based on that the SPS includesthe subpicture-related information.
 20. A non-transitorycomputer-readable storage medium storing a bitstream generated by animage encoding method, the image encoding method comprising: derivingresidual samples for a current block; deriving transform coefficientsbased on a transform process for the residual samples; derivingquantized transform coefficients based on a quantization process for thetransform coefficients; generating residual information based on thequantized transform coefficients; determining whether an in-loopfiltering process is performed for reconstructed samples of a currentpicture across virtual boundaries; and encoding image information basedon the residual information and the determination, wherein the imageinformation includes a sequence parameter set (SPS), and wherein whetherthe SPS includes additional information related to the virtualboundaries is determined based on whether the SPS includessubpicture-related information.